diff --git a/nym-connect/desktop/.babelrc b/nym-connect/desktop/.babelrc deleted file mode 100644 index 7a840ad24e..0000000000 --- a/nym-connect/desktop/.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/desktop/.env.sample b/nym-connect/desktop/.env.sample deleted file mode 100644 index cc3febee19..0000000000 --- a/nym-connect/desktop/.env.sample +++ /dev/null @@ -1 +0,0 @@ -ADMIN_ADDRESS= \ No newline at end of file diff --git a/nym-connect/desktop/.eslintrc b/nym-connect/desktop/.eslintrc deleted file mode 100644 index 3ea1281af1..0000000000 --- a/nym-connect/desktop/.eslintrc +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": [ - "@nymproject/eslint-config-react-typescript" - ], - "parserOptions": { - "project": "./tsconfig.eslint.json" - } -} diff --git a/nym-connect/desktop/.nvmrc b/nym-connect/desktop/.nvmrc deleted file mode 100644 index 25bf17fc5a..0000000000 --- a/nym-connect/desktop/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -18 \ No newline at end of file diff --git a/nym-connect/desktop/.prettierrc b/nym-connect/desktop/.prettierrc deleted file mode 100644 index 1bc34d0c3f..0000000000 --- a/nym-connect/desktop/.prettierrc +++ /dev/null @@ -1,7 +0,0 @@ -{ - "trailingComma": "all", - "singleQuote": true, - "printWidth": 120, - "tabWidth": 2, - "semi": true -} diff --git a/nym-connect/desktop/.storybook/main.js b/nym-connect/desktop/.storybook/main.js deleted file mode 100644 index 344c27778e..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/mocks/tauri/app.js b/nym-connect/desktop/.storybook/mocks/tauri/app.js deleted file mode 100644 index 83d80d7037..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/mocks/tauri/clipboard.js b/nym-connect/desktop/.storybook/mocks/tauri/clipboard.js deleted file mode 100644 index a34847db86..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/mocks/tauri/event.js b/nym-connect/desktop/.storybook/mocks/tauri/event.js deleted file mode 100644 index a100d30337..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/mocks/tauri/index.js b/nym-connect/desktop/.storybook/mocks/tauri/index.js deleted file mode 100644 index c411c3bf18..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/mocks/tauri/notification.js b/nym-connect/desktop/.storybook/mocks/tauri/notification.js deleted file mode 100644 index dcbe18e574..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/mocks/tauri/window.js b/nym-connect/desktop/.storybook/mocks/tauri/window.js deleted file mode 100644 index 9f0afeeebd..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/preview-fonts.js b/nym-connect/desktop/.storybook/preview-fonts.js deleted file mode 100644 index a7989fca9a..0000000000 --- a/nym-connect/desktop/.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/desktop/.storybook/preview.js b/nym-connect/desktop/.storybook/preview.js deleted file mode 100644 index 9c14c3ec99..0000000000 --- a/nym-connect/desktop/.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/desktop/CHANGELOG.md b/nym-connect/desktop/CHANGELOG.md deleted file mode 100644 index 29fcf45d6c..0000000000 --- a/nym-connect/desktop/CHANGELOG.md +++ /dev/null @@ -1,208 +0,0 @@ -# Changelog - -## [Unreleased] - -## [v1.1.21-kitkat] (2023-09-12) - -- NC - Handle failure when config is too old ([#3847]) - -[#3847]: https://github.com/nymtech/nym/issues/3847 - -## [v1.1.20-twix] (2023-09-05) - -- nym-connect directory error handling ([#3830]) -- NC - it should not be possible to toggle speedy mode while the connection is active ([#3816]) - -[#3830]: https://github.com/nymtech/nym/pull/3830 -[#3816]: https://github.com/nymtech/nym/issues/3816 - -## [v1.1.19-snickers] (2023-08-29) - -- NymConnect sometimes fails to connect because the gateway it fetches from the validator-api to use is running an old version (of the gateway binary) ([#3788]) - -[#3788]: https://github.com/nymtech/nym/issues/3788 - -## [1.1.18] (2023-08-22) - -- refactor(nc-desktop): use userdata storage to save user gateway&sp ([#3723]) - -[#3723]: https://github.com/nymtech/nym/pull/3723 - -## [1.1.17] (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]) - -[#3472]: https://github.com/nymtech/nym/issues/3472 - -## [v1.1.15] (2023-07-25) - -- NC Desktop - remove sentry DSN from code ([#3694]) -- NC - Add Alephium wallet in the supported app list ([#3681]) - -[#3694]: https://github.com/nymtech/nym/issues/3694 -[#3681]: https://github.com/nymtech/nym/issues/3681 - -## [v1.1.14] (2023-07-04) - -- Nym connect fails to start when encountering an old config version ([#3588]) -- NC desktop - apps section adjustments + add monero integration ([#2977]) -- nym-connect: use different service provider directory when medium toggle enabled ([#3617]) -- Fix medium toggle in nym-connect ([#3590]) -- [bugfix] NC: load old gateway configuration if we're not registering ([#3586]) -- nym-connect: medium speed setting ([#3585]) - -[#3588]: https://github.com/nymtech/nym/issues/3588 -[#2977]: https://github.com/nymtech/nym/issues/2977 -[#3617]: https://github.com/nymtech/nym/pull/3617 -[#3590]: https://github.com/nymtech/nym/pull/3590 -[#3586]: https://github.com/nymtech/nym/pull/3586 -[#3585]: https://github.com/nymtech/nym/pull/3585 - -## [v1.1.13] (2023-06-20) - -- NymConnect - add sentry.io reporting ([#3421]) - -[#3421]: https://github.com/nymtech/nym/issues/3421 - -## [v1.1.12] (2023-03-07) - -- NymConnect - Update display for selected Service Provider ([#3116]) - -[#3116]: https://github.com/nymtech/nym/issues/3116 - -## [v1.1.11] (2023-02-28) - -- NC - add the option to manually select and use a specific Service Provider ([#2953]) - -[#2953]: https://github.com/nymtech/nym/issues/2953 - -## [v1.1.10] (2023-02-21) - -- NC - add logs window for troubleshooting ([#2951]) - -[#2951]: https://github.com/nymtech/nym/issues/2951 - -## [nym-connect-v1.1.9](https://github.com/nymtech/nym/tree/nym-connect-v1.1.9) (2023-02-14) - -- Button animations ([#2949]) -- add effect when the button is clicked ([#2947]) -- UI to select gateways based on some performance criteria by checking gateways' routing score from nym-api ([#2942]) -- client health check when connecting ([#2859]) -- allow user to select own gateway ([#2952]) - -[#2952]: https://github.com/nymtech/nym/issues/2952 -[#2949]: https://github.com/nymtech/nym/issues/2949 -[#2947]: https://github.com/nymtech/nym/issues/2947 -[#2942]: https://github.com/nymtech/nym/issues/2942 -[#2859]: https://github.com/nymtech/nym/issues/2859 - -## [nym-connect-v1.1.8](https://github.com/nymtech/nym/tree/nym-connect-v1.1.8) (2023-01-31) - -- Add supported apps in the menu + update guide ([#2868]) -- Copy changes to remove the dropdown: ([#2777]) - -[#2868]: https://github.com/nymtech/nym/issues/2868 -[#2777]: https://github.com/nymtech/nym/issues/2777 - -## [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/desktop/Cargo.lock b/nym-connect/desktop/Cargo.lock deleted file mode 100644 index 17ed7acd91..0000000000 --- a/nym-connect/desktop/Cargo.lock +++ /dev/null @@ -1,8729 +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 = "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" -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.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" -dependencies = [ - "getrandom 0.2.10", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -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", -] - -[[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 = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -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.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "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 = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" -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", -] - -[[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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "async-broadcast" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -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.63", -] - -[[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.63", -] - -[[package]] -name = "atk" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3d816ce6f0e2909a96830d6911c2aff044370b1ef92d7f267b43bae5addedd" -dependencies = [ - "atk-sys", - "bitflags 1.3.2", - "glib", - "libc", -] - -[[package]] -name = "atk-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58aeb089fb698e06db8089971c7ee317ab9644bade33383f63631437b03aafb6" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.1.1", -] - -[[package]] -name = "atoi" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7c57d12312ff59c811c0643f4d80830505833c9ffaebd193d819392b265be8e" -dependencies = [ - "num-traits", -] - -[[package]] -name = "atomic-waker" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" - -[[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 = "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.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" - -[[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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bip32" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e141fb0f8be1c7b45887af94c88b182472b57c96b56773250ae00cd6a14a164" -dependencies = [ - "bs58 0.5.1", - "hmac", - "k256", - "once_cell", - "pbkdf2", - "rand_core 0.6.4", - "ripemd", - "sha2 0.10.8", - "subtle 2.5.0", - "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.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" - -[[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", - "digest 0.8.1", - "opaque-debug 0.2.3", -] - -[[package]] -name = "blake3" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "199c42ab6972d92c9f8995f086273d25c42fc0f7b2a1fcefba465c1352d25ba5" -dependencies = [ - "arrayref", - "arrayvec 0.7.4", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.7", -] - -[[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 = [ - "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.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" -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.8.0" -source = "git+https://github.com/jstuczyn/bls12_381?branch=feature/gt-serialization-0.8.0#c4543fde7d02efea6ecfcf22e14476ddb516b483" -dependencies = [ - "digest 0.9.0", - "ff", - "group", - "pairing", - "rand_core 0.6.4", - "subtle 2.5.0", - "zeroize", -] - -[[package]] -name = "bnum" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d" - -[[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" - -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2 0.10.8", - "tinyvec", -] - -[[package]] -name = "bstr" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" - -[[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.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] - -[[package]] -name = "cairo-rs" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c76ee391b03d35510d9fa917357c7f1855bd9a6659c95a1b392e33f49b3369bc" -dependencies = [ - "bitflags 1.3.2", - "cairo-sys-rs", - "glib", - "libc", - "thiserror", -] - -[[package]] -name = "cairo-sys-rs" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c55d429bef56ac9172d25fecb85dc8068307d17acd74b377866b7a1ef25d3c8" -dependencies = [ - "glib-sys", - "libc", - "system-deps 6.1.1", -] - -[[package]] -name = "cargo_toml" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" -dependencies = [ - "serde", - "toml 0.7.6", -] - -[[package]] -name = "cc" -version = "1.0.98" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" - -[[package]] -name = "celes" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39b9a21273925d7cc9e8a9a5f068122341336813c607014f5ef64f82b6acba58" -dependencies = [ - "serde", -] - -[[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.4.1", -] - -[[package]] -name = "cfg-expr" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3431df59f28accaf4cb4eed4a9acc66bea3f3c3753aa6cdc2f024174ef232af7" -dependencies = [ - "smallvec", -] - -[[package]] -name = "cfg-expr" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b40ccee03b5175c18cde8f37e7d2a33bcef6f8ec8f7cc0d81090d1bb380949c9" -dependencies = [ - "smallvec", - "target-lexicon", -] - -[[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", - "cpufeatures", -] - -[[package]] -name = "chacha20poly1305" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" -dependencies = [ - "aead", - "chacha20", - "cipher", - "poly1305", - "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.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", - "zeroize", -] - -[[package]] -name = "clap" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac495e00dcec98c83465d5ad66c5c4fabd652fd6686e7c6269b117e729a6f17b" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap_builder" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c77ed9a32a62e6ca27175d00d29d05ca32e396ea1eb5fb01d8256b669cec7663" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim", -] - -[[package]] -name = "clap_complete" -version = "4.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc443334c81a804575546c5a8a79b4913b50e28d69232903604cada1de817ce" -dependencies = [ - "clap", -] - -[[package]] -name = "clap_complete_fig" -version = "4.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99fee1d30a51305a6c2ed3fc5709be3c8af626c9c958e04dd9ae94e27bcbce9f" -dependencies = [ - "clap", - "clap_complete", -] - -[[package]] -name = "clap_derive" -version = "4.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "clap_lex" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" - -[[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 = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "colored" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f741c91823341bebf717d4c71bda820630ce065443b58bd1b7451af008355" -dependencies = [ - "is-terminal", - "lazy_static", - "winapi", -] - -[[package]] -name = "colored" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2674ec482fbc38012cf31e6c42ba0177b431a0cb6f15fe40efa5aab1bda516f6" -dependencies = [ - "is-terminal", - "lazy_static", - "windows-sys 0.48.0", -] - -[[package]] -name = "combine" -version = "4.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" -dependencies = [ - "bytes", - "memchr", -] - -[[package]] -name = "concurrent-queue" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -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 = "const-str" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aca749d3d3f5b87a0d6100509879f9cf486ab510803a4a4e1001da1ff61c2bd6" - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[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.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" - -[[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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb142d41022986c1d8ff29103a1411c8a3dfad3552f87a4f8dc50d61d4f4e33" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "libc", -] - -[[package]] -name = "cosmos-sdk-proto" -version = "0.20.0" -source = "git+https://github.com/jstuczyn/cosmos-rust?branch=nym-temp/all-validator-features#67718aa27a96efb9881e927a8f998c94b885093c" -dependencies = [ - "prost", - "prost-types", - "tendermint-proto", -] - -[[package]] -name = "cosmrs" -version = "0.15.0" -source = "git+https://github.com/jstuczyn/cosmos-rust?branch=nym-temp/all-validator-features#67718aa27a96efb9881e927a8f998c94b885093c" -dependencies = [ - "bip32", - "cosmos-sdk-proto", - "ecdsa", - "eyre", - "k256", - "rand_core 0.6.4", - "serde", - "serde_json", - "signature", - "subtle-encoding", - "tendermint", - "tendermint-rpc", - "thiserror", -] - -[[package]] -name = "cosmwasm-crypto" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd50718a2b6830ce9eb5d465de5a018a12e71729d66b70807ce97e6dd14f931d" -dependencies = [ - "digest 0.10.7", - "ecdsa", - "ed25519-zebra", - "k256", - "rand_core 0.6.4", - "thiserror", -] - -[[package]] -name = "cosmwasm-derive" -version = "1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "242e98e7a231c122e08f300d9db3262d1007b51758a8732cd6210b3e9faa4f3a" -dependencies = [ - "syn 1.0.109", -] - -[[package]] -name = "cosmwasm-schema" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ae2e971fb831d0c4fa3c8c3d2291cdbdd73786a73d65196dbf983d9b2468af" -dependencies = [ - "cosmwasm-schema-derive", - "schemars", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cosmwasm-schema-derive" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cadc57fd0825b85bc2f9b972c17da718b9efb4bc17e5935cc2d6036324f853d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "cosmwasm-std" -version = "1.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e98e19fae6c3f468412f731274b0f9434602722009d6a77432d39c7c4bb09202" -dependencies = [ - "base64 0.21.4", - "bnum", - "cosmwasm-crypto", - "cosmwasm-derive", - "derivative", - "forward_ref", - "hex", - "schemars", - "serde", - "serde-json-wasm", - "sha2 0.10.8", - "thiserror", -] - -[[package]] -name = "cpufeatures" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17b76ff3a4162b0b27f354a0c87015ddad39d35f9c0c36607a3bdd175dde1f1" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe" -dependencies = [ - "crc-catalog", -] - -[[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.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset 0.9.0", - "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.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crypto-bigint" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4c2f4e1afd912bc40bfd6fed5d9dc1f288e0ba01bfcc835cc5bc3eb13efe15" -dependencies = [ - "generic-array 0.14.7", - "rand_core 0.6.4", - "subtle 2.5.0", - "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 = "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.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" -dependencies = [ - "quote", - "syn 2.0.63", -] - -[[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.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[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.5.0", - "zeroize", -] - -[[package]] -name = "curve25519-dalek" -version = "4.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" -dependencies = [ - "cfg-if", - "cpufeatures", - "curve25519-dalek-derive", - "digest 0.10.7", - "fiat-crypto", - "platforms", - "rustc_version", - "serde", - "subtle 2.5.0", - "zeroize", -] - -[[package]] -name = "curve25519-dalek-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83fdaf97f4804dcebfa5862639bc9ce4121e82140bec2a987ac5140294865b5b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "curve25519-dalek-ng" -version = "4.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c359b7249347e46fb28804470d071c921156ad62b3eef5d34e2ba867533dec8" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.6.4", - "subtle-ng", - "zeroize", -] - -[[package]] -name = "cw-controllers" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d8edce4b78785f36413f67387e4be7d0cb7d032b5d4164bcc024f9c3f3f2ea" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw-utils", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw-storage-plus" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5ff29294ee99373e2cd5fd21786a3c0ced99a52fec2ca347d565489c61b723c" -dependencies = [ - "cosmwasm-std", - "schemars", - "serde", -] - -[[package]] -name = "cw-utils" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c80e93d1deccb8588db03945016a292c3c631e6325d349ebb35d2db6f4f946f7" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw2", - "schemars", - "semver 1.0.23", - "serde", - "thiserror", -] - -[[package]] -name = "cw2" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "semver 1.0.23", - "serde", - "thiserror", -] - -[[package]] -name = "cw20" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-utils", - "schemars", - "serde", -] - -[[package]] -name = "cw3" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2967fbd073d4b626dd9e7148e05a84a3bebd9794e71342e12351110ffbb12395" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-utils", - "cw20", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "cw4" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24754ff6e45f2a1c60adc409d9b2eb87666012c44021329141ffaab3388fccd2" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-storage-plus", - "schemars", - "serde", -] - -[[package]] -name = "darling" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0209d94da627ab5605dcccf08bb18afa5009cfbef48d8a8b7d7bdbc79be25c5e" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "177e3443818124b357d8e76f53be906d60937f0d3a90773a664fa63fa253e621" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.63", -] - -[[package]] -name = "darling_macro" -version = "0.20.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.0", - "lock_api", - "once_cell", - "parking_lot_core 0.9.8", -] - -[[package]] -name = "data-encoding" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" - -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "serde", - "uuid 1.4.1", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[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.7", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "const-oid", - "crypto-common", - "subtle 2.5.0", -] - -[[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-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" -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 = "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 = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "dtoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbb2bf8e87535c23f7a8a321e364ce21462d0ff10cb6407820e8e96dfff6653" - -[[package]] -name = "dtoa-short" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbaceec3c6e4211c79e7b1800fb9680527106beb2f9c51904a3210c03a448c74" -dependencies = [ - "dtoa", -] - -[[package]] -name = "dunce" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" - -[[package]] -name = "dyn-clone" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "304e6508efa593091e97a9abbc10f90aa7ca635b6d2784feff3c89d41dd12272" - -[[package]] -name = "ecdsa" -version = "0.16.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4b1e0c257a9e9f25f90ff76d7a68360ed497ee519c8e428d1825ef0000799d4" -dependencies = [ - "der", - "digest 0.10.7", - "elliptic-curve", - "rfc6979", - "serdect", - "signature", - "spki", -] - -[[package]] -name = "ed25519" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60f6d271ca33075c88028be6f04d502853d63a5ece419d269c15315d4fc1cf1d" -dependencies = [ - "pkcs8", - "serde", - "signature", -] - -[[package]] -name = "ed25519-consensus" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c8465edc8ee7436ffea81d21a019b16676ee3db267aa8d5a8d729581ecf998b" -dependencies = [ - "curve25519-dalek-ng", - "hex", - "rand_core 0.6.4", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-dalek" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" -dependencies = [ - "curve25519-dalek 4.1.2", - "ed25519", - "rand_core 0.6.4", - "serde", - "sha2 0.10.8", - "subtle 2.5.0", - "zeroize", -] - -[[package]] -name = "ed25519-zebra" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" -dependencies = [ - "curve25519-dalek 3.2.0", - "hashbrown 0.12.3", - "hex", - "rand_core 0.6.4", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "elliptic-curve" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "968405c8fdc9b3bf4df0a6638858cc0b52462836ab6b1c87377785dd09cf1c0b" -dependencies = [ - "base16ct", - "crypto-bigint", - "digest 0.10.7", - "ff", - "generic-array 0.14.7", - "group", - "pkcs8", - "rand_core 0.6.4", - "sec1", - "serdect", - "subtle 2.5.0", - "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" -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 = "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.63", -] - -[[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 = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -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", -] - -[[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.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -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 = "fastrand" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764" - -[[package]] -name = "fdeflate" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d329bdeac514ee06249dabc27877490f17f5d371ec693360768b838e19f3ae10" -dependencies = [ - "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", -] - -[[package]] -name = "ff" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" -dependencies = [ - "bitvec", - "rand_core 0.6.4", - "subtle 2.5.0", -] - -[[package]] -name = "fiat-crypto" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0870c84016d4b481be5c9f323c24f65e31e901ae618f0e80f4308fb00de1d2d" - -[[package]] -name = "field-offset" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" -dependencies = [ - "memoffset 0.9.0", - "rustc_version", -] - -[[package]] -name = "filetime" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", -] - -[[package]] -name = "findshlibs" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" -dependencies = [ - "cc", - "lazy_static", - "libc", - "winapi", -] - -[[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.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" -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.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" -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.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 0.11.2", -] - -[[package]] -name = "futures-io" -version = "0.3.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -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.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[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 = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "gdk" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e05c1f572ab0e1f15be94217f0dc29088c248b14f792a5ff0af0d84bcda9e8" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "gdk-pixbuf", - "gdk-sys", - "gio", - "glib", - "libc", - "pango", -] - -[[package]] -name = "gdk-pixbuf" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad38dd9cc8b099cceecdf41375bb6d481b1b5a7cd5cd603e10a69a9383f8619a" -dependencies = [ - "bitflags 1.3.2", - "gdk-pixbuf-sys", - "gio", - "glib", - "libc", -] - -[[package]] -name = "gdk-pixbuf-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "140b2f5378256527150350a8346dbdb08fadc13453a7a2d73aecd5fab3c402a7" -dependencies = [ - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.1.1", -] - -[[package]] -name = "gdk-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32e7a08c1e8f06f4177fb7e51a777b8c1689f743a7bc11ea91d44d2226073a88" -dependencies = [ - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "pkg-config", - "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]] -name = "gdkx11-sys" -version = "0.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4b7f8c7a84b407aa9b143877e267e848ff34106578b64d1e0a24bf550716178" -dependencies = [ - "gdk-sys", - "glib-sys", - "libc", - "system-deps 6.1.1", - "x11", -] - -[[package]] -name = "generator" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc16584ff22b460a382b7feec54b23d2908d858152e5739a120b949293bd74e" -dependencies = [ - "cc", - "libc", - "log", - "rustversion", - "windows 0.48.0", -] - -[[package]] -name = "generic-array" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" -dependencies = [ - "typenum", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "serde", - "typenum", - "version_check", - "zeroize", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" -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 = "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 1.3.2", - "futures-channel", - "futures-core", - "futures-io", - "gio-sys", - "glib", - "libc", - "once_cell", - "thiserror", -] - -[[package]] -name = "gio-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32157a475271e2c4a023382e9cab31c4584ee30a97da41d3c4e9fdd605abcf8d" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 6.1.1", - "winapi", -] - -[[package]] -name = "glib" -version = "0.15.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edb0306fbad0ab5428b0ca674a23893db909a98582969c9b537be4ced78c505d" -dependencies = [ - "bitflags 1.3.2", - "futures-channel", - "futures-core", - "futures-executor", - "futures-task", - "glib-macros", - "glib-sys", - "gobject-sys", - "libc", - "once_cell", - "smallvec", - "thiserror", -] - -[[package]] -name = "glib-macros" -version = "0.15.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10c6ae9f6fa26f4fb2ac16b528d138d971ead56141de489f8111e259b9df3c4a" -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.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef4b192f8e65e9cf76cbf4ea71fa8e3be4a0e18ffe3d68b8da6836974cc5bad4" -dependencies = [ - "libc", - "system-deps 6.1.1", -] - -[[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.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759c97c1e17c55525b57192c06a267cda0ac5210b222d6b82189a2338fa1c13d" -dependencies = [ - "aho-corasick", - "bstr", - "fnv", - "log", - "regex", -] - -[[package]] -name = "gloo-net" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43aaa242d1239a8822c15c645f02166398da4f8b5c4bae795c1f5b44e9eee173" -dependencies = [ - "futures-channel", - "futures-core", - "futures-sink", - "gloo-utils", - "http 0.2.9", - "js-sys", - "pin-project", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[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 = "gloo-utils" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" -dependencies = [ - "js-sys", - "serde", - "serde_json", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gobject-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d57ce44246becd17153bd035ab4d32cfee096a657fc01f2231c9278378d1e0a" -dependencies = [ - "glib-sys", - "libc", - "system-deps 6.1.1", -] - -[[package]] -name = "group" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" -dependencies = [ - "ff", - "rand_core 0.6.4", - "subtle 2.5.0", -] - -[[package]] -name = "gtk" -version = "0.15.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e3004a2d5d6d8b5057d2b57b3712c9529b62e82c77f25c1fecde1fd5c23bd0" -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.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5bc2f0587cba247f60246a0ca11fe25fb733eabc3de12d1965fc07efab87c84" -dependencies = [ - "atk-sys", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "pango-sys", - "system-deps 6.1.1", -] - -[[package]] -name = "gtk3-macros" -version = "0.15.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684c0456c086e8e7e9af73ec5b84e35938df394712054550e81558d21c44ab0d" -dependencies = [ - "anyhow", - "proc-macro-crate", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "h2" -version = "0.3.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.9", - "indexmap 1.9.3", - "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.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.6", -] - -[[package]] -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" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" -dependencies = [ - "hashbrown 0.14.0", -] - -[[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.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" - -[[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.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - -[[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.9", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa 1.0.9", -] - -[[package]] -name = "http-body" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" -dependencies = [ - "bytes", - "http 0.2.9", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" -dependencies = [ - "bytes", - "futures-core", - "http 1.1.0", - "http-body 1.0.0", - "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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[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.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http 0.2.9", - "http-body 0.4.5", - "httparse", - "httpdate", - "itoa 1.0.9", - "pin-project-lite", - "socket2 0.4.9", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "httpdate", - "itoa 1.0.9", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d78e1e73ec14cf7375674f74d7dde185c8206fd9dea6fb6295e8a98098aaa97" -dependencies = [ - "futures-util", - "http 0.2.9", - "hyper 0.14.27", - "rustls 0.21.7", - "tokio", - "tokio-rustls 0.24.1", -] - -[[package]] -name = "hyper-rustls" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bea761b46ae2b24eb4aef630d8d1c398157b6fc29e6350ecf090a0b70c952c" -dependencies = [ - "futures-util", - "http 1.1.0", - "hyper 1.2.0", - "hyper-util", - "rustls 0.22.4", - "rustls-pki-types", - "tokio", - "tokio-rustls 0.25.0", - "tower-service", -] - -[[package]] -name = "hyper-tls" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper 0.14.27", - "native-tls", - "tokio", - "tokio-native-tls", -] - -[[package]] -name = "hyper-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.2.0", - "pin-project-lite", - "socket2 0.5.5", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -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", -] - -[[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.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "ignore" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe7873dab538a9a44ad79ede1faf5f30d49f9a5c883ddbab48bce81b64b7492" -dependencies = [ - "globset", - "lazy_static", - "log", - "memchr", - "regex", - "same-file", - "thread_local", - "walkdir", - "winapi-util", -] - -[[package]] -name = "image" -version = "0.24.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f3dfdbdd72063086ff443e297b61695500514b1e41095b6fb9a5ab48a70a711" -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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "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", - "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 = [ - "block-padding", - "generic-array 0.14.7", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "io-lifetimes" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" -dependencies = [ - "hermit-abi 0.3.2", - "libc", - "windows-sys 0.48.0", -] - -[[package]] -name = "ipnet" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b29a3cd74f0f4598934efe3aeba42bae0eb4680554128851ebbecb02af14e6" - -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi 0.3.2", - "rustix 0.38.8", - "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 = "0.4.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" - -[[package]] -name = "itoa" -version = "1.0.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" - -[[package]] -name = "javascriptcore-rs" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf053e7843f2812ff03ef5afe34bb9c06ffee120385caad4f6b9967fcd37d41c" -dependencies = [ - "bitflags 1.3.2", - "glib", - "javascriptcore-rs-sys", -] - -[[package]] -name = "javascriptcore-rs-sys" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "905fbb87419c5cde6e3269537e4ea7d46431f3008c5d057e915ef3f115e7793c" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "system-deps 5.0.0", -] - -[[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 = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "json-patch" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" -dependencies = [ - "serde", - "serde_json", - "thiserror", - "treediff", -] - -[[package]] -name = "k256" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" -dependencies = [ - "cfg-if", - "ecdsa", - "elliptic-curve", - "once_cell", - "sha2 0.10.8", - "signature", -] - -[[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 = "libappindicator" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db2d3cb96d092b4824cb306c9e544c856a4cb6210c1081945187f7f1924b47e8" -dependencies = [ - "glib", - "gtk", - "gtk-sys", - "libappindicator-sys", - "log", -] - -[[package]] -name = "libappindicator-sys" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1b3b6681973cea8cc3bce7391e6d7d5502720b80a581c9a95c9cbaf592826aa" -dependencies = [ - "gtk-sys", - "libloading", - "once_cell", -] - -[[package]] -name = "libc" -version = "0.2.150" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "libm" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" - -[[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 = "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.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -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" -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.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" -dependencies = [ - "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.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9402858e87f85f88bf518bd2e68450640df1c99b1ddb3ea28c4d5d823bb54cdd" -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 = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[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.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -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", -] - -[[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 = "minisign-verify" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" - -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", - "simd-adler32", -] - -[[package]] -name = "mio" -version = "0.8.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.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 = "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" -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 = [ - "log", - "mac-notification-sys", - "serde", - "tauri-winrt-notification", - "zbus", -] - -[[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-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[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.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi 0.3.2", - "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 0.5.1", - "cosmrs", - "cosmwasm-std", - "ecdsa", - "getset", - "nym-credentials-interface", - "nym-crypto", - "nym-mixnet-contract-common", - "nym-node-requests", - "schemars", - "serde", - "tendermint", - "time", -] - -[[package]] -name = "nym-bandwidth-controller" -version = "0.1.0" -dependencies = [ - "bip39", - "log", - "nym-coconut", - "nym-credential-storage", - "nym-credentials", - "nym-credentials-interface", - "nym-crypto", - "nym-network-defaults", - "nym-validator-client", - "rand 0.8.5", - "thiserror", - "url", - "zeroize", -] - -[[package]] -name = "nym-bin-common" -version = "0.6.0" -dependencies = [ - "clap", - "clap_complete", - "clap_complete_fig", - "const-str", - "log", - "pretty_env_logger", - "schemars", - "semver 0.11.0", - "serde", - "vergen", -] - -[[package]] -name = "nym-client-core" -version = "1.1.15" -dependencies = [ - "async-trait", - "base64 0.21.4", - "bs58 0.5.1", - "cfg-if", - "futures", - "gloo-timers", - "http-body-util", - "humantime-serde", - "hyper 1.2.0", - "hyper-util", - "log", - "nym-bandwidth-controller", - "nym-client-core-config-types", - "nym-client-core-gateways-storage", - "nym-client-core-surb-storage", - "nym-config", - "nym-country-group", - "nym-credential-storage", - "nym-crypto", - "nym-explorer-client", - "nym-gateway-client", - "nym-gateway-requests", - "nym-id", - "nym-metrics", - "nym-network-defaults", - "nym-nonexhaustive-delayqueue", - "nym-pemstore", - "nym-sphinx", - "nym-task", - "nym-topology", - "nym-validator-client", - "rand 0.8.5", - "serde", - "serde_json", - "sha2 0.10.8", - "si-scale", - "tap", - "thiserror", - "time", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-utils", - "wasmtimer", - "zeroize", -] - -[[package]] -name = "nym-client-core-config-types" -version = "0.1.0" -dependencies = [ - "humantime-serde", - "nym-config", - "nym-country-group", - "nym-pemstore", - "nym-sphinx-addressing", - "nym-sphinx-params", - "serde", - "thiserror", - "url", -] - -[[package]] -name = "nym-client-core-gateways-storage" -version = "0.1.0" -dependencies = [ - "async-trait", - "cosmrs", - "log", - "nym-crypto", - "nym-gateway-requests", - "serde", - "sqlx", - "thiserror", - "time", - "tokio", - "url", - "zeroize", -] - -[[package]] -name = "nym-client-core-surb-storage" -version = "0.1.0" -dependencies = [ - "async-trait", - "dashmap", - "log", - "nym-crypto", - "nym-sphinx", - "nym-task", - "sqlx", - "thiserror", - "time", - "tokio", -] - -[[package]] -name = "nym-coconut" -version = "0.5.0" -dependencies = [ - "bls12_381", - "bs58 0.5.1", - "digest 0.9.0", - "ff", - "getrandom 0.2.10", - "group", - "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-schema", - "cosmwasm-std", - "nym-multisig-contract-common", -] - -[[package]] -name = "nym-coconut-dkg-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "cw-utils", - "cw2", - "cw4", - "nym-contracts-common", - "nym-multisig-contract-common", -] - -[[package]] -name = "nym-config" -version = "0.1.0" -dependencies = [ - "dirs 5.0.1", - "handlebars", - "log", - "nym-network-defaults", - "serde", - "toml 0.7.6", - "url", -] - -[[package]] -name = "nym-connect" -version = "1.1.21" -dependencies = [ - "anyhow", - "bip39", - "dirs 4.0.0", - "dotenvy", - "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-sphinx", - "nym-task", - "nym-topology", - "nym-validator-client", - "pretty_env_logger", - "rand 0.8.5", - "reqwest 0.11.22", - "rust-embed", - "sentry", - "sentry-log", - "serde", - "serde_json", - "serde_repr", - "tap", - "tauri", - "tauri-build", - "tauri-codegen", - "tauri-macros", - "tempfile", - "thiserror", - "time", - "tokio", - "toml 0.7.6", - "ts-rs", - "url", - "yaml-rust", -] - -[[package]] -name = "nym-contracts-common" -version = "0.5.0" -dependencies = [ - "bs58 0.5.1", - "cosmwasm-schema", - "cosmwasm-std", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "nym-country-group" -version = "0.1.0" -dependencies = [ - "serde", - "tracing", -] - -[[package]] -name = "nym-credential-storage" -version = "0.1.0" -dependencies = [ - "async-trait", - "log", - "sqlx", - "thiserror", - "tokio", - "zeroize", -] - -[[package]] -name = "nym-credentials" -version = "0.1.0" -dependencies = [ - "bincode", - "bls12_381", - "cosmrs", - "log", - "nym-api-requests", - "nym-credentials-interface", - "nym-crypto", - "nym-validator-client", - "serde", - "thiserror", - "time", - "zeroize", -] - -[[package]] -name = "nym-credentials-interface" -version = "0.1.0" -dependencies = [ - "bls12_381", - "nym-coconut", - "serde", - "thiserror", -] - -[[package]] -name = "nym-crypto" -version = "0.4.0" -dependencies = [ - "aes", - "blake3", - "bs58 0.5.1", - "cipher", - "ctr", - "digest 0.10.7", - "ed25519-dalek", - "generic-array 0.14.7", - "hkdf", - "hmac", - "nym-pemstore", - "nym-sphinx-types", - "rand 0.8.5", - "serde", - "serde_bytes", - "subtle-encoding", - "thiserror", - "x25519-dalek", - "zeroize", -] - -[[package]] -name = "nym-dkg" -version = "0.1.0" -dependencies = [ - "bitvec", - "bls12_381", - "bs58 0.5.1", - "ff", - "group", - "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-exit-policy" -version = "0.1.0" -dependencies = [ - "serde", - "thiserror", - "tracing", -] - -[[package]] -name = "nym-explorer-api-requests" -version = "0.1.0" -dependencies = [ - "nym-api-requests", - "nym-contracts-common", - "nym-mixnet-contract-common", - "schemars", - "serde", -] - -[[package]] -name = "nym-explorer-client" -version = "0.1.0" -dependencies = [ - "log", - "nym-explorer-api-requests", - "reqwest 0.12.4", - "serde", - "thiserror", - "url", -] - -[[package]] -name = "nym-gateway-client" -version = "0.1.0" -dependencies = [ - "futures", - "getrandom 0.2.10", - "gloo-utils", - "log", - "nym-bandwidth-controller", - "nym-credential-storage", - "nym-credentials", - "nym-crypto", - "nym-gateway-requests", - "nym-network-defaults", - "nym-pemstore", - "nym-sphinx", - "nym-task", - "nym-validator-client", - "rand 0.8.5", - "serde", - "si-scale", - "thiserror", - "time", - "tokio", - "tokio-stream", - "tokio-tungstenite", - "tungstenite", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-utils", - "wasmtimer", -] - -[[package]] -name = "nym-gateway-requests" -version = "0.1.0" -dependencies = [ - "bs58 0.5.1", - "futures", - "generic-array 0.14.7", - "log", - "nym-credentials", - "nym-credentials-interface", - "nym-crypto", - "nym-pemstore", - "nym-sphinx", - "rand 0.8.5", - "serde", - "serde_json", - "thiserror", - "tokio", - "tungstenite", - "wasmtimer", - "zeroize", -] - -[[package]] -name = "nym-group-contract-common" -version = "0.1.0" -dependencies = [ - "cosmwasm-schema", - "cw-controllers", - "cw4", - "schemars", - "serde", -] - -[[package]] -name = "nym-http-api-client" -version = "0.1.0" -dependencies = [ - "async-trait", - "http 1.1.0", - "reqwest 0.12.4", - "serde", - "serde_json", - "thiserror", - "tracing", - "url", - "wasmtimer", -] - -[[package]] -name = "nym-id" -version = "0.1.0" -dependencies = [ - "nym-credential-storage", - "nym-credentials", - "thiserror", - "time", - "tracing", - "zeroize", -] - -[[package]] -name = "nym-metrics" -version = "0.1.0" -dependencies = [ - "dashmap", - "lazy_static", - "log", - "prometheus", -] - -[[package]] -name = "nym-mixnet-contract-common" -version = "0.6.0" -dependencies = [ - "bs58 0.4.0", - "cosmwasm-schema", - "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-schema", - "cosmwasm-std", - "cw-storage-plus", - "cw-utils", - "cw3", - "cw4", - "schemars", - "serde", - "thiserror", -] - -[[package]] -name = "nym-network-defaults" -version = "0.1.0" -dependencies = [ - "cfg-if", - "dotenvy", - "hex-literal", - "log", - "once_cell", - "schemars", - "serde", - "thiserror", - "url", -] - -[[package]] -name = "nym-node-requests" -version = "0.1.0" -dependencies = [ - "base64 0.21.4", - "celes", - "humantime 2.1.0", - "humantime-serde", - "nym-bin-common", - "nym-crypto", - "nym-exit-policy", - "nym-wireguard-types", - "schemars", - "serde", - "serde_json", - "thiserror", - "time", -] - -[[package]] -name = "nym-nonexhaustive-delayqueue" -version = "0.1.0" -dependencies = [ - "tokio", - "tokio-stream", - "tokio-util", - "wasmtimer", -] - -[[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 4.1.2", - "getrandom 0.2.10", - "log", - "rand 0.8.5", - "rayon", - "sphinx-packet", - "thiserror", - "zeroize", -] - -[[package]] -name = "nym-pemstore" -version = "0.3.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 = [ - "anyhow", - "dirs 4.0.0", - "futures", - "log", - "nym-bandwidth-controller", - "nym-client-core", - "nym-config", - "nym-contracts-common", - "nym-credential-storage", - "nym-mixnet-contract-common", - "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.8.5", - "reqwest 0.12.4", - "schemars", - "serde", - "tap", - "thiserror", - "tokio", - "url", -] - -[[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 = [ - "bincode", - "log", - "nym-exit-policy", - "nym-service-providers-common", - "nym-sphinx-addressing", - "serde", - "serde_json", - "tap", - "thiserror", -] - -[[package]] -name = "nym-sphinx" -version = "0.1.0" -dependencies = [ - "log", - "nym-crypto", - "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.8.5", - "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-routing", - "nym-sphinx-types", - "nym-topology", - "rand 0.8.5", - "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 0.5.1", - "nym-crypto", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-routing", - "nym-sphinx-types", - "nym-topology", - "rand 0.8.5", - "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.8.5", - "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-routing", - "nym-sphinx-types", - "nym-topology", - "rand 0.8.5", - "thiserror", -] - -[[package]] -name = "nym-sphinx-forwarding" -version = "0.1.0" -dependencies = [ - "nym-outfox", - "nym-sphinx-addressing", - "nym-sphinx-params", - "nym-sphinx-types", - "thiserror", -] - -[[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 = [ - "nym-outfox", - "sphinx-packet", - "thiserror", -] - -[[package]] -name = "nym-task" -version = "0.1.0" -dependencies = [ - "futures", - "log", - "thiserror", - "tokio", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasmtimer", -] - -[[package]] -name = "nym-topology" -version = "0.1.0" -dependencies = [ - "async-trait", - "bs58 0.5.1", - "log", - "nym-api-requests", - "nym-bin-common", - "nym-config", - "nym-crypto", - "nym-mixnet-contract-common", - "nym-sphinx-addressing", - "nym-sphinx-routing", - "nym-sphinx-types", - "rand 0.8.5", - "semver 0.11.0", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "nym-validator-client" -version = "0.1.0" -dependencies = [ - "async-trait", - "base64 0.13.1", - "bip32", - "bip39", - "colored 2.0.4", - "cosmrs", - "cosmwasm-std", - "cw-controllers", - "cw-utils", - "cw2", - "cw3", - "cw4", - "eyre", - "flate2", - "futures", - "itertools", - "log", - "nym-api-requests", - "nym-coconut", - "nym-coconut-bandwidth-contract-common", - "nym-coconut-dkg-common", - "nym-config", - "nym-contracts-common", - "nym-group-contract-common", - "nym-http-api-client", - "nym-mixnet-contract-common", - "nym-multisig-contract-common", - "nym-network-defaults", - "nym-vesting-contract-common", - "prost", - "reqwest 0.12.4", - "serde", - "serde_json", - "sha2 0.9.9", - "tendermint-rpc", - "thiserror", - "tokio", - "url", - "wasmtimer", - "zeroize", -] - -[[package]] -name = "nym-vesting-contract-common" -version = "0.7.0" -dependencies = [ - "cosmwasm-schema", - "cosmwasm-std", - "nym-contracts-common", - "nym-mixnet-contract-common", - "serde", - "thiserror", -] - -[[package]] -name = "nym-wireguard-types" -version = "0.1.0" -dependencies = [ - "base64 0.21.4", - "dashmap", - "log", - "nym-config", - "nym-crypto", - "nym-network-defaults", - "serde", - "thiserror", - "x25519-dalek", -] - -[[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 = "object" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -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" -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.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" -dependencies = [ - "bitflags 1.3.2", - "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.63", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" -dependencies = [ - "cc", - "libc", - "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 = "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "006e42d5b888366f1880eda20371fedde764ed2213dc8496f49622fa0c99cd5e" -dependencies = [ - "log", - "serde", - "winapi", -] - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "pairing" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fec4625e73cf41ef4bb6846cafa6d44736525f442ba45e407c4a000a13996f" -dependencies = [ - "group", -] - -[[package]] -name = "pango" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e4045548659aee5313bde6c582b0d83a627b7904dd20dc2d9ef0895d414e4f" -dependencies = [ - "bitflags 1.3.2", - "glib", - "libc", - "once_cell", - "pango-sys", -] - -[[package]] -name = "pango-sys" -version = "0.15.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2a00081cde4661982ed91d80ef437c20eacaf6aa1a5962c0279ae194662c3aa" -dependencies = [ - "glib-sys", - "gobject-sys", - "libc", - "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" -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.8", -] - -[[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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.3.5", - "smallvec", - "windows-targets 0.48.1", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pathdiff" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac", -] - -[[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.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" - -[[package]] -name = "pest" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" -dependencies = [ - "thiserror", - "ucd-trie", -] - -[[package]] -name = "pest_derive" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "666d00490d4ac815001da55838c500eafb0320019bbaa44444137c48b443a853" -dependencies = [ - "pest", - "pest_generator", -] - -[[package]] -name = "pest_generator" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ca01446f50dbda87c1786af8770d535423fa8a53aec03b8f4e3d7eb10e0929" -dependencies = [ - "pest", - "pest_meta", - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "pest_meta" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56af0a30af74d0445c0bf6d9d051c979b516a1a5af790d251daee76005420a48" -dependencies = [ - "once_cell", - "pest", - "sha2 0.10.8", -] - -[[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.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" - -[[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.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" - -[[package]] -name = "platforms" -version = "3.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4503fa043bf02cee09a9582e9554b4c6403b2ef55e4612e96561d294419429f8" - -[[package]] -name = "plist" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" -dependencies = [ - "base64 0.21.4", - "indexmap 1.9.3", - "line-wrap", - "quick-xml 0.29.0", - "serde", - "time", -] - -[[package]] -name = "png" -version = "0.17.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59871cc5b6cce7eaccca5a802b4173377a1c2ba90654246789a8fa2334426d11" -dependencies = [ - "bitflags 1.3.2", - "crc32fast", - "fdeflate", - "flate2", - "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]] -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 = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[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.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "prometheus" -version = "0.13.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" -dependencies = [ - "cfg-if", - "fnv", - "lazy_static", - "memchr", - "parking_lot 0.12.1", - "protobuf", - "thiserror", -] - -[[package]] -name = "prost" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fdd22f3b9c31b53c060df4a0613a1c7f062d4115a2b984dd15b1858f7e340d" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-derive" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "265baba7fabd416cf5078179f7d2cbeca4ce7a9041111900675ea7c4cb8a4c32" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "prost-types" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e081b29f63d83a4bc75cfc9f3fe424f9156cf92d8a4f0c9407cce9a1b67327cf" -dependencies = [ - "prost", -] - -[[package]] -name = "protobuf" -version = "2.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" - -[[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.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b9228215d82c7b61490fec1de287136b5de6f5700f6e58ea9ad61a7964ca51" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -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.10", -] - -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[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.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ff9a1f06a88b01621b7ae906ef0211290d1c8a168a15542486a8f61c0833b9" - -[[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_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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" -dependencies = [ - "getrandom 0.2.10", - "redox_syscall 0.2.16", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -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" -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.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b" -dependencies = [ - "base64 0.21.4", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http 0.2.9", - "http-body 0.4.5", - "hyper 0.14.27", - "hyper-rustls 0.24.1", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.21.7", - "rustls-native-certs", - "rustls-pemfile 1.0.3", - "serde", - "serde_json", - "serde_urlencoded", - "system-configuration", - "tokio", - "tokio-native-tls", - "tokio-rustls 0.24.1", - "tokio-socks", - "tokio-util", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "winreg 0.50.0", -] - -[[package]] -name = "reqwest" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" -dependencies = [ - "base64 0.22.1", - "bytes", - "futures-core", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.2.0", - "hyper-rustls 0.26.0", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls 0.22.4", - "rustls-pemfile 2.1.2", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tokio-rustls 0.25.0", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots 0.26.1", - "winreg 0.52.0", -] - -[[package]] -name = "rfc6979" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2" -dependencies = [ - "hmac", - "subtle 2.5.0", -] - -[[package]] -name = "rfd" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0149778bd99b6959285b0933288206090c50e2327f47a9c463bfdbf45c8823ea" -dependencies = [ - "block", - "dispatch", - "glib-sys", - "gobject-sys", - "gtk-sys", - "js-sys", - "lazy_static", - "log", - "objc", - "objc-foundation", - "objc_id", - "raw-window-handle", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "windows 0.37.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 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom 0.2.10", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.52.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "rust-embed" -version = "6.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a36224c3276f8c4ebc8c20f158eca7ca4359c8db89991c4925132aaaf6702661" -dependencies = [ - "rust-embed-impl", - "rust-embed-utils", - "walkdir", -] - -[[package]] -name = "rust-embed-impl" -version = "6.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b94b81e5b2c284684141a2fb9e2a31be90638caf040bf9afbc5a0416afe1ac" -dependencies = [ - "proc-macro2", - "quote", - "rust-embed-utils", - "syn 2.0.63", - "walkdir", -] - -[[package]] -name = "rust-embed-utils" -version = "7.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d38ff6bf570dc3bb7100fce9f7b60c33fa71d80e88da3f2580df4ff2bdded74" -dependencies = [ - "globset", - "sha2 0.10.8", - "walkdir", -] - -[[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.23", -] - -[[package]] -name = "rustix" -version = "0.37.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" -dependencies = [ - "bitflags 1.3.2", - "errno", - "io-lifetimes", - "libc", - "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]] -name = "rustls" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" -dependencies = [ - "log", - "ring 0.16.20", - "sct", - "webpki", -] - -[[package]] -name = "rustls" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd8d6c9f025a446bc4d18ad9632e69aec8f287aa84499ee335599fabd20c3fd8" -dependencies = [ - "log", - "ring 0.16.20", - "rustls-webpki 0.101.6", - "sct", -] - -[[package]] -name = "rustls" -version = "0.22.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-pki-types", - "rustls-webpki 0.102.4", - "subtle 2.5.0", - "zeroize", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile 1.0.3", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" -dependencies = [ - "base64 0.21.4", -] - -[[package]] -name = "rustls-pemfile" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" -dependencies = [ - "base64 0.22.1", - "rustls-pki-types", -] - -[[package]] -name = "rustls-pki-types" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" - -[[package]] -name = "rustls-webpki" -version = "0.101.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c7d5dece342910d9ba34d259310cae3e0154b873b35408b787b59bce53d34fe" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - -[[package]] -name = "rustls-webpki" -version = "0.102.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e" -dependencies = [ - "ring 0.17.8", - "rustls-pki-types", - "untrusted 0.9.0", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" - -[[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.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" -dependencies = [ - "windows-sys 0.48.0", -] - -[[package]] -name = "schemars" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6e7ed6919cb46507fb01ff1654309219f62b4d603822501b0b80d42f6f21ef" -dependencies = [ - "dyn-clone", - "indexmap 1.9.3", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185f2b7aa7e02d418e453790dde16890256bbd2bcd04b7dc5348811052b53f49" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 2.0.63", -] - -[[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.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - -[[package]] -name = "sec1" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" -dependencies = [ - "base16ct", - "der", - "generic-array 0.14.7", - "pkcs8", - "serdect", - "subtle 2.5.0", - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -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.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -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 = "sentry" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b0ad16faa5d12372f914ed40d00bda21a6d1bdcc99264c5e5e1c9495cf3654" -dependencies = [ - "httpdate", - "native-tls", - "reqwest 0.11.22", - "sentry-anyhow", - "sentry-backtrace", - "sentry-contexts", - "sentry-core", - "sentry-debug-images", - "sentry-panic", - "sentry-tracing", - "tokio", - "ureq", -] - -[[package]] -name = "sentry-anyhow" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3a571f02f9982af445af829c4837fe4857568a431bd2bed9f7cf88de4a6c44" -dependencies = [ - "anyhow", - "sentry-backtrace", - "sentry-core", -] - -[[package]] -name = "sentry-backtrace" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11f2ee8f147bb5f22ac59b5c35754a759b9a6f6722402e2a14750b2a63fc59bd" -dependencies = [ - "backtrace", - "once_cell", - "regex", - "sentry-core", -] - -[[package]] -name = "sentry-contexts" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcd133362c745151eeba0ac61e3ba8350f034e9fe7509877d08059fe1d7720c6" -dependencies = [ - "hostname", - "libc", - "os_info", - "rustc_version", - "sentry-core", - "uname", -] - -[[package]] -name = "sentry-core" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7163491708804a74446642ff2c80b3acd668d4b9e9f497f85621f3d250fd012b" -dependencies = [ - "once_cell", - "rand 0.8.5", - "sentry-types", - "serde", - "serde_json", -] - -[[package]] -name = "sentry-debug-images" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5003d7ff08aa3b2b76994080b183e8cfa06c083e280737c9cee02ca1c70f5e" -dependencies = [ - "findshlibs", - "once_cell", - "sentry-core", -] - -[[package]] -name = "sentry-log" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2558fc4a85326e6063711b45ce82ed6b18cdacd0732580c1567da914ac1df33e" -dependencies = [ - "log", - "sentry-core", -] - -[[package]] -name = "sentry-panic" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4dfe8371c9b2e126a8b64f6fefa54cef716ff2a50e63b5558a48b899265bccd" -dependencies = [ - "sentry-backtrace", - "sentry-core", -] - -[[package]] -name = "sentry-tracing" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aca8b88978677a27ee1a91beafe4052306c474c06f582321fde72d2e2cc2f7f" -dependencies = [ - "sentry-backtrace", - "sentry-core", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "sentry-types" -version = "0.31.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e7a88e0c1922d19b3efee12a8215f6a8a806e442e665ada71cc222cab72985f" -dependencies = [ - "debugid", - "getrandom 0.2.10", - "hex", - "serde", - "serde_json", - "thiserror", - "time", - "url", - "uuid 1.4.1", -] - -[[package]] -name = "serde" -version = "1.0.201" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "780f1cebed1629e4753a1a38a3c72d30b97ec044f0aef68cb26650a3c5cf363c" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-json-wasm" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15bee9b04dd165c3f4e142628982ddde884c2022a89e8ddf99c4829bf2c3a58" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_bytes" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab33ec92f677585af6d88c65593ae2375adde54efdbf16d597f2cbc7a6d368ff" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.201" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e405930b9796f1c00bee880d03fc7e0bb4b9a11afc776885ffe84320da2865" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "serde_derive_internals" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "330f01ce65a3a5fe59a60c82f3c9a024b573b8a6e875bd233fe5f934e71d54e3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "serde_json" -version = "1.0.104" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" -dependencies = [ - "itoa 1.0.9", - "ryu", - "serde", -] - -[[package]] -name = "serde_repr" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "serde_spanned" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96426c9936fd7a0124915f9185ea1d20aa9445cc9821142f0a73bc9207a2e186" -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 1.0.9", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1402f54f9a3b9e2efe71c1cea24e648acce55887983553eeb858cf3115acfd49" -dependencies = [ - "base64 0.21.4", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.0.0", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9197f1ad0e3c173a0222d3c4404fb04c3afe87e962bcb327af73e8301fa203c7" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "serdect" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" -dependencies = [ - "base16ct", - "serde", -] - -[[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 = "sha1" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[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.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[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 = "si-scale" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44beb68bf488343b13ddbd74d1d5d5e6559a58b6dfaee74eb8d5ed4f7ed7666f" - -[[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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" -dependencies = [ - "digest 0.10.7", - "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" -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.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -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 1.3.2", - "gio", - "glib", - "libc", - "once_cell", - "soup2-sys", -] - -[[package]] -name = "soup2-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "009ef427103fcb17f802871647a7fa6c60cbb654b4c4e4c0ac60a31c5f6dc9cf" -dependencies = [ - "bitflags 1.3.2", - "gio-sys", - "glib-sys", - "gobject-sys", - "libc", - "system-deps 5.0.0", -] - -[[package]] -name = "sphinx-packet" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dabeca95bf5fd0563d6be7ebcb1c6a9fcb135746a0ba9050c47dc68c8607e595" -dependencies = [ - "aes", - "arrayref", - "blake2", - "bs58 0.5.1", - "byteorder", - "chacha", - "ctr", - "curve25519-dalek 4.1.2", - "digest 0.10.7", - "hkdf", - "hmac", - "lioness", - "log", - "rand 0.8.5", - "rand_distr", - "sha2 0.10.8", - "subtle 2.5.0", -] - -[[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.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" -dependencies = [ - "base64ct", - "der", -] - -[[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.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8de3b03a925878ed54a954f621e64bf55a3c1bd29652d0d1a17830405350188" -dependencies = [ - "sqlx-core", - "sqlx-macros", -] - -[[package]] -name = "sqlx-core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8241483a83a3f33aa5fff7e7d9def398ff9990b2752b6c6112b83c6d246029" -dependencies = [ - "ahash 0.7.6", - "atoi", - "bitflags 1.3.2", - "byteorder", - "bytes", - "crc", - "crossbeam-queue", - "dotenvy", - "either", - "event-listener", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "hashlink", - "hex", - "indexmap 1.9.3", - "itoa 1.0.9", - "libc", - "libsqlite3-sys", - "log", - "memchr", - "once_cell", - "paste", - "percent-encoding", - "rustls 0.20.8", - "rustls-pemfile 1.0.3", - "sha2 0.10.8", - "smallvec", - "sqlformat", - "sqlx-rt", - "stringprep", - "thiserror", - "time", - "tokio-stream", - "url", - "webpki-roots 0.22.6", -] - -[[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.8", - "sqlx-core", - "sqlx-rt", - "syn 1.0.109", - "url", -] - -[[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.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" -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 = "subtle" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "subtle-encoding" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dcb1ed7b8330c5eed5441052651dd7a12c75e2ed88f2ec024ae1fa3a5e59945" -dependencies = [ - "zeroize", -] - -[[package]] -name = "subtle-ng" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "734676eb262c623cec13c3155096e08d1f8f29adce39ba17948b18dad1e54142" - -[[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.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf5be731623ca1a1fb7d8be6f261a3be6d3e2337b8a1f97be944d020c8fcb704" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "system-deps" -version = "5.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18db855554db7bd0e73e06cf7ba3df39f97812cb11d3f75e71c39bf45171797e" -dependencies = [ - "cfg-expr 0.9.1", - "heck 0.3.3", - "pkg-config", - "toml 0.5.11", - "version-compare 0.0.11", -] - -[[package]] -name = "system-deps" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30c2de8a4d8f4b823d634affc9cd2a74ec98c53a756f317e529a48046cbf71f3" -dependencies = [ - "cfg-expr 0.15.4", - "heck 0.4.1", - "pkg-config", - "toml 0.7.6", - "version-compare 0.1.1", -] - -[[package]] -name = "tao" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6d198e01085564cea63e976ad1566c1ba2c2e4cc79578e35d9f05521505e31" -dependencies = [ - "bitflags 1.3.2", - "cairo-rs", - "cc", - "cocoa", - "core-foundation", - "core-graphics", - "crossbeam-channel", - "dirs-next", - "dispatch", - "gdk", - "gdk-pixbuf", - "gdk-sys", - "gdkwayland-sys", - "gdkx11-sys", - "gio", - "glib", - "glib-sys", - "gtk", - "image", - "instant", - "jni", - "lazy_static", - "libappindicator", - "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.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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tar" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -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.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbe522898e35407a8e60dc3870f7579fea2fc262a6a6072eccdd37ae1e1d91e" -dependencies = [ - "anyhow", - "base64 0.21.4", - "bytes", - "cocoa", - "dirs-next", - "embed_plist", - "encoding_rs", - "flate2", - "futures-util", - "glib", - "glob", - "gtk", - "heck 0.4.1", - "http 0.2.9", - "ignore", - "minisign-verify", - "notify-rust", - "objc", - "once_cell", - "open", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "regex", - "reqwest 0.11.22", - "rfd", - "semver 1.0.23", - "serde", - "serde_json", - "serde_repr", - "serialize-to-javascript", - "state", - "tar", - "tauri-macros", - "tauri-runtime", - "tauri-runtime-wry", - "tauri-utils", - "tempfile", - "thiserror", - "time", - "tokio", - "url", - "uuid 1.4.1", - "webkit2gtk", - "webview2-com", - "windows 0.39.0", - "zip", -] - -[[package]] -name = "tauri-build" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d2edd6a259b5591c8efdeb9d5702cb53515b82a6affebd55c7fd6d3a27b7d1b" -dependencies = [ - "anyhow", - "cargo_toml", - "heck 0.4.1", - "json-patch", - "semver 1.0.23", - "serde", - "serde_json", - "tauri-utils", - "tauri-winres", -] - -[[package]] -name = "tauri-codegen" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ad2d49fdeab4a08717f5b49a163bdc72efc3b1950b6758245fcde79b645e1a" -dependencies = [ - "base64 0.21.4", - "brotli", - "ico", - "json-patch", - "plist", - "png", - "proc-macro2", - "quote", - "regex", - "semver 1.0.23", - "serde", - "serde_json", - "sha2 0.10.8", - "tauri-utils", - "thiserror", - "time", - "uuid 1.4.1", - "walkdir", -] - -[[package]] -name = "tauri-macros" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb12a2454e747896929338d93b0642144bb51e0dddbb36e579035731f0d76b7" -dependencies = [ - "heck 0.4.1", - "proc-macro2", - "quote", - "syn 1.0.109", - "tauri-codegen", - "tauri-utils", -] - -[[package]] -name = "tauri-runtime" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "108683199cb18f96d2d4134187bb789964143c845d2d154848dda209191fd769" -dependencies = [ - "gtk", - "http 0.2.9", - "http-range", - "rand 0.8.5", - "raw-window-handle", - "serde", - "serde_json", - "tauri-utils", - "thiserror", - "url", - "uuid 1.4.1", - "webview2-com", - "windows 0.39.0", -] - -[[package]] -name = "tauri-runtime-wry" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7aa256a1407a3a091b5d843eccc1a5042289baf0a43d1179d9f0fcfea37c1b" -dependencies = [ - "cocoa", - "gtk", - "percent-encoding", - "rand 0.8.5", - "raw-window-handle", - "tauri-runtime", - "tauri-utils", - "uuid 1.4.1", - "webkit2gtk", - "webview2-com", - "windows 0.39.0", - "wry", -] - -[[package]] -name = "tauri-utils" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03fc02bb6072bb397e1d473c6f76c953cda48b4a2d0cce605df284aa74a12e84" -dependencies = [ - "brotli", - "ctor", - "dunce", - "glob", - "heck 0.4.1", - "html5ever", - "infer", - "json-patch", - "kuchiki", - "memchr", - "phf 0.10.1", - "proc-macro2", - "quote", - "semver 1.0.23", - "serde", - "serde_json", - "serde_with", - "thiserror", - "url", - "walkdir", - "windows 0.39.0", -] - -[[package]] -name = "tauri-winres" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -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", - "windows 0.39.0", -] - -[[package]] -name = "tempfile" -version = "3.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc02fddf48964c42031a0b3fe0428320ecf3a73c401040fc0096f97794310651" -dependencies = [ - "cfg-if", - "fastrand 2.0.0", - "redox_syscall 0.3.5", - "rustix 0.38.8", - "windows-sys 0.48.0", -] - -[[package]] -name = "tendermint" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc2294fa667c8b548ee27a9ba59115472d0a09c2ba255771092a7f1dcf03a789" -dependencies = [ - "bytes", - "digest 0.10.7", - "ed25519", - "ed25519-consensus", - "flex-error", - "futures", - "k256", - "num-traits", - "once_cell", - "prost", - "prost-types", - "ripemd", - "serde", - "serde_bytes", - "serde_json", - "serde_repr", - "sha2 0.10.8", - "signature", - "subtle 2.5.0", - "subtle-encoding", - "tendermint-proto", - "time", - "zeroize", -] - -[[package]] -name = "tendermint-config" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a25dbe8b953e80f3d61789fbdb83bf9ad6c0ef16df5ca6546f49912542cc137" -dependencies = [ - "flex-error", - "serde", - "serde_json", - "tendermint", - "toml 0.5.11", - "url", -] - -[[package]] -name = "tendermint-proto" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc728a4f9e891d71adf66af6ecaece146f9c7a11312288a3107b3e1d6979aaf" -dependencies = [ - "bytes", - "flex-error", - "num-derive", - "num-traits", - "prost", - "prost-types", - "serde", - "serde_bytes", - "subtle-encoding", - "time", -] - -[[package]] -name = "tendermint-rpc" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbf0a4753b46a190f367337e0163d0b552a2674a6bac54e74f9f2cdcde2969b" -dependencies = [ - "async-trait", - "bytes", - "flex-error", - "futures", - "getrandom 0.2.10", - "peg", - "pin-project", - "reqwest 0.11.22", - "semver 1.0.23", - "serde", - "serde_bytes", - "serde_json", - "subtle 2.5.0", - "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.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[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.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa 1.0.9", - "js-sys", - "libc", - "num-conv", - "num_threads", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "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.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "pin-project-lite", - "signal-hook-registry", - "socket2 0.5.5", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[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.23.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" -dependencies = [ - "rustls 0.20.8", - "tokio", - "webpki", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls 0.21.7", - "tokio", -] - -[[package]] -name = "tokio-rustls" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775e0c0f0adb3a2f22a00c4745d728b479985fc15ee7ca6a2608388c5569860f" -dependencies = [ - "rustls 0.22.4", - "rustls-pki-types", - "tokio", -] - -[[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.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.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls 0.21.7", - "tokio", - "tokio-rustls 0.24.1", - "tungstenite", - "webpki-roots 0.25.4", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.19.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" -dependencies = [ - "indexmap 2.0.0", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "pin-project", - "pin-project-lite", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[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", - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", -] - -[[package]] -name = "tracing-core" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" -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.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a651bc37f915e81f087d86e62a18eec5f79550c7faff886f7090b4ea757c77" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log", -] - -[[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 = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1ff1f8c90369bc172200013ac17ae86e7b5def580687df4e6127883454ff2b0" -dependencies = [ - "thiserror", - "ts-rs-macros", -] - -[[package]] -name = "ts-rs-macros" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6f41cc0aeb7a4a55730188e147d3795a7349b501f8334697fd37629b896cdc2" -dependencies = [ - "Inflector", - "proc-macro2", - "quote", - "syn 2.0.63", - "termcolor", -] - -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.9", - "httparse", - "log", - "rand 0.8.5", - "rustls 0.21.7", - "sha1", - "thiserror", - "url", - "utf-8", - "webpki-roots 0.24.0", -] - -[[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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -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" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b72f89f0ca32e4db1c04e2a72f5345d59796d4866a1ee0609084569f73683dc8" -dependencies = [ - "libc", -] - -[[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.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" - -[[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 = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle 2.5.0", -] - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "ureq" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b11c96ac7ee530603dcdf68ed1557050f374ce55a5a07193ebf8cbc9f8927e9" -dependencies = [ - "base64 0.21.4", - "log", - "native-tls", - "once_cell", - "url", -] - -[[package]] -name = "url" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" -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.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" -dependencies = [ - "getrandom 0.2.10", - "serde", -] - -[[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 = "8.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1290fd64cc4e7d3c9b07d7f333ce0ce0007253e32870e632624835cc80b83939" -dependencies = [ - "anyhow", - "rustc_version", - "rustversion", - "time", -] - -[[package]] -name = "version-compare" -version = "0.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c18c859eead79d8b95d09e4678566e8d70105c4e7b251f707a03df32442661b" - -[[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 = "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" -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 = "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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "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.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.63", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.63", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "wasm-streams" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[package]] -name = "wasm-utils" -version = "0.1.0" -dependencies = [ - "futures", - "getrandom 0.2.10", - "gloo-net", - "gloo-utils", - "js-sys", - "tungstenite", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - -[[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 0.12.1", - "pin-utils", - "slab", - "wasm-bindgen", -] - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webkit2gtk" -version = "0.18.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8f859735e4a452aeb28c6c56a852967a8a76c8eb1cc32dbf931ad28a13d6370" -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", - "soup2", - "webkit2gtk-sys", -] - -[[package]] -name = "webkit2gtk-sys" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d76ca6ecc47aeba01ec61e480139dda143796abcae6f83bcddf50d6b5b1dcf3" -dependencies = [ - "atk-sys", - "bitflags 1.3.2", - "cairo-sys-rs", - "gdk-pixbuf-sys", - "gdk-sys", - "gio-sys", - "glib-sys", - "gobject-sys", - "gtk-sys", - "javascriptcore-rs-sys", - "libc", - "pango-sys", - "pkg-config", - "soup2-sys", - "system-deps 6.1.1", -] - -[[package]] -name = "webpki" -version = "0.22.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ecc0cd7cac091bf682ec5efa18b1cff79d617b84181f38b3951dbe135f607f" -dependencies = [ - "ring 0.16.20", - "untrusted 0.7.1", -] - -[[package]] -name = "webpki-roots" -version = "0.22.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" -dependencies = [ - "webpki", -] - -[[package]] -name = "webpki-roots" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" -dependencies = [ - "rustls-webpki 0.101.6", -] - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "webpki-roots" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3de34ae270483955a94f4b21bdaaeb83d508bb84a01435f393818edb0012009" -dependencies = [ - "rustls-pki-types", -] - -[[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", -] - -[[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.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" -dependencies = [ - "windows_aarch64_msvc 0.37.0", - "windows_i686_gnu 0.37.0", - "windows_i686_msvc 0.37.0", - "windows_x86_64_gnu 0.37.0", - "windows_x86_64_msvc 0.37.0", -] - -[[package]] -name = "windows" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c4bd0a50ac6020f65184721f758dba47bb9fbc2133df715ec74a237b26794a" -dependencies = [ - "windows-implement", - "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.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" -dependencies = [ - "windows-targets 0.48.1", -] - -[[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-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 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.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.1", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" -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-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[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_gnullvm" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" - -[[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_aarch64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" - -[[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_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" - -[[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_i686_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" - -[[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_gnu" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[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_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.37.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" - -[[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 = "windows_x86_64_msvc" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winnow" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5504cc7644f4b593cbc05c4a55bf9bd4e94b867c3c0bd440934174d50482427d" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a1a57ff50e9b408431e8f97d5456f2807f8eb2a2cd79b06068fc87f8ecf189" -dependencies = [ - "cfg-if", - "winapi", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "winreg" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "wry" -version = "0.24.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea" -dependencies = [ - "base64 0.13.1", - "block", - "cocoa", - "core-graphics", - "crossbeam-channel", - "dunce", - "gdk", - "gio", - "glib", - "gtk", - "html5ever", - "http 0.2.9", - "kuchiki", - "libc", - "log", - "objc", - "objc_id", - "once_cell", - "serde", - "serde_json", - "sha2 0.10.8", - "soup2", - "tao", - "thiserror", - "url", - "webkit2gtk", - "webkit2gtk-sys", - "webview2-com", - "windows 0.39.0", - "windows-implement", -] - -[[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 = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb66477291e7e8d2b0ff1bcb900bf29489a9692816d79874bea351e7a8b6de96" -dependencies = [ - "curve25519-dalek 4.1.2", - "rand_core 0.6.4", - "serde", - "zeroize", -] - -[[package]] -name = "xattr" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -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" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" -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" -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.63", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -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/Cargo.toml b/nym-connect/desktop/Cargo.toml deleted file mode 100644 index 5322fc260c..0000000000 --- a/nym-connect/desktop/Cargo.toml +++ /dev/null @@ -1,3 +0,0 @@ -[workspace] -members = ["src-tauri"] -resolver = "2" diff --git a/nym-connect/desktop/README.md b/nym-connect/desktop/README.md deleted file mode 100644 index a30341be85..0000000000 --- a/nym-connect/desktop/README.md +++ /dev/null @@ -1,95 +0,0 @@ - - -# Nym Connect - Desktop - -Nym is an open-source, decentralized and permissionless privacy system. It provides full-stack privacy, allowing other applications, services or blockchains to provide their users with strong metadata protection, at both the network level (mixnet), and the application level (anonymous credentials) without the need to build privacy from scratch. - -Nym Connects sets up a SOCKS5 proxy for local applications to use. - -## Installation prerequisites - Linux / Mac - -- `Yarn` -- `NodeJS >= v16` -- `Rust & cargo` - -## Installation prerequisites - Windows - -- When running on Windows you will need to install c++ build tools -- An easy guide to get rust up and running [Installation]("http://kennykerr.ca/2019/11/18/rust-getting-started/") -- When installing NodeJS please use the `current features` version -- Using a package manager like [Chocolatey]("chocolatey.org") is recommended -- Nym connect requires you to have `Webview2` installed, please head to the [Installer](https://developer.microsoft.com/en-us/microsoft-edge/webview2/#download-section), this will ensure a smooth app launch - -## Installation - -Inside the `nym-connect` directory, run the following command: -``` -yarn install -``` - -## Development mode - -You can compile nym-connect in development mode by running the following command inside the `nym-connect` directory: - -``` -yarn dev -``` -This will produce a binary in - `nym-connect/target/debug/` named `nym-connect` - -To launch, navigate to the directory and run the following command: `./nym-connect` - -## Production mode - -Run the following command from the `nym-connect` folder -``` -yarn build -``` -The output will compile different types of binaries dependent on your hardware / OS system. Once the binaries are built, they can be located as follows: - -### Binary output directory structure -``` -**macos** -| -└─── target/release -| |─ nym-connect -└───target/release/bundle/dmg -│ │─ bundle_dmg.sh -│ │─ nym-connect.*.dmg -└───target/release/bundle/macos/MacOs -│ │─ nym-connect -| -**Linux** -└─── target/release -| │─ nym-connect -└───target/release/bundle/appimage -│ │─ nym-connect_*_.AppImage -│ │─ build_appimage.sh -└───target/release/bundle/deb -│ │─ nym-connect_*_.deb -| -**Windows** -└─── target/release -| │─ nym-connect.exe -└───target/release/bundle/msi -│ │─ nym-connect_*_.msi -``` - -For instructions on how to release nym-connect, please see [RELEASE.md](./docs/release/RELEASE.md). - -# Storybook - -Run storybook with: - -``` -yarn storybook -``` - -And build storybook static site with: - -``` -yarn storybook:build -``` - diff --git a/nym-connect/desktop/dist/.gitkeep b/nym-connect/desktop/dist/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nym-connect/desktop/package.json b/nym-connect/desktop/package.json deleted file mode 100644 index 8b147f6324..0000000000 --- a/nym-connect/desktop/package.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "@nym/nym-connect", - "version": "1.1.21", - "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:dev": "RUST_DEBUG=1 yarn tauri dev", - "tauri:build": "yarn tauri build", - "dev": "run-p webpack:dev tauri:dev", - "prebuild": "yarn --cwd ../.. build", - "build": "run-s webpack:prod tauri:build", - "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" - }, - "dependencies": { - "@emotion/react": "^11.7.0", - "@emotion/styled": "^11.6.0", - "@hookform/resolvers": "^2.8.0", - "@mui/icons-material": "^5.2.0", - "@mui/lab": "^5.0.0-alpha.72", - "@mui/material": "^5.2.2", - "@mui/styles": "^5.2.2", - "@mui/system": ">= 5", - "@nymproject/react": "^1.0.0", - "@sentry/integrations": "^7.54.0", - "@sentry/react": "^7.54.0", - "@tauri-apps/api": "^1.2.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": "^1.2.0" - }, - "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": "^1.2.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", - "favicons": "^7.0.2", - "favicons-webpack-plugin": "^5.0.2", - "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-favicons": "^1.3.8", - "webpack-merge": "^5.8.0", - "yaml-loader": "^0.8.0" - } -} \ No newline at end of file diff --git a/nym-connect/desktop/public/favicon.ico b/nym-connect/desktop/public/favicon.ico deleted file mode 100644 index bc951a1c6f..0000000000 Binary files a/nym-connect/desktop/public/favicon.ico and /dev/null differ diff --git a/nym-connect/desktop/public/favicon.png b/nym-connect/desktop/public/favicon.png deleted file mode 100644 index fcf1e747d0..0000000000 Binary files a/nym-connect/desktop/public/favicon.png and /dev/null differ diff --git a/nym-connect/desktop/public/growth.html b/nym-connect/desktop/public/growth.html deleted file mode 100644 index 08672aaa3c..0000000000 --- a/nym-connect/desktop/public/growth.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Nym Connect - - -
- - diff --git a/nym-connect/desktop/public/index.html b/nym-connect/desktop/public/index.html deleted file mode 100644 index 2ba643a663..0000000000 --- a/nym-connect/desktop/public/index.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Nym Connect - - -
- - diff --git a/nym-connect/desktop/public/log.html b/nym-connect/desktop/public/log.html deleted file mode 100644 index 5ced2243f1..0000000000 --- a/nym-connect/desktop/public/log.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - Nym Wallet Logs - - -
- - diff --git a/nym-connect/desktop/scripts/pre_medium_build.sh b/nym-connect/desktop/scripts/pre_medium_build.sh deleted file mode 100755 index 5a797ffc8f..0000000000 --- a/nym-connect/desktop/scripts/pre_medium_build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#! /bin/bash - -set -e - -if ! [[ "$RELEASE_TAG" =~ ^nym-connect-s-v.*? ]]; then - echo -e " ✗ Invalid release tag $RELEASE_TAG" - exit 1 -fi - -version="${RELEASE_TAG#nym-connect-s-v}" - -sed -i "s/^name = \".*\"/name = \"nym-connect-s\"/" src-tauri/Cargo.toml -sed -i "s/^version = \".*\"/version = \"$version\"/" src-tauri/Cargo.toml -sed -i 's/"productName": "nym-connect"/"productName": "NymConnect S"/' src-tauri/tauri.conf.json -sed -i "s/\"version\": \".*\"/\"version\": \"$version\"/" src-tauri/tauri.conf.json - -echo -e " ✓ bump version $version" diff --git a/nym-connect/desktop/src-tauri/.gitignore b/nym-connect/desktop/src-tauri/.gitignore deleted file mode 100644 index c123704591..0000000000 --- a/nym-connect/desktop/src-tauri/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ -WixTools diff --git a/nym-connect/desktop/src-tauri/Cargo.toml b/nym-connect/desktop/src-tauri/Cargo.toml deleted file mode 100644 index 382203bb28..0000000000 --- a/nym-connect/desktop/src-tauri/Cargo.toml +++ /dev/null @@ -1,81 +0,0 @@ -[package] -name = "nym-connect" -version = "1.1.21" -description = "nym-connect" -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 - -[build-dependencies] -tauri-build = { version = "^1.2.1", features = [] } - -tauri-codegen = "^1.2.1" -tauri-macros = "^1.2.1" - -[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.22", 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" -# 07.07.23: JS: I changed the version from ^1.2.2 to fix up indirect import of web-sys -tauri = { version = "1.4.1", features = [ - "clipboard-write-text", - "macos-private-api", - "notification-all", - "shell-open", - "system-tray", - "updater", - "window-close", - "window-minimize", - "window-start-dragging", -] } -#tendermint-rpc = "0.23.0" -thiserror = "1.0" -time = { version = "0.3.30", features = ["local-offset"] } -tokio = { version = "1.24.1", features = ["sync", "time"] } -url = "2.4" -yaml-rust = "0.4" -toml = "0.7" -sentry = { version = "0.31.5", features = ["anyhow"] } -sentry-log = "0.31.5" -dotenvy = "0.15.7" - -nym-client-core = { path = "../../../common/client-core" } -nym-api-requests = { path = "../../../nym-api/nym-api-requests" } -nym-contracts-common = { path = "../../../common/cosmwasm-smart-contracts/contracts-common" } -nym-config = { path = "../../../common/config" } -nym-crypto = { path = "../../../common/crypto" } -nym-credential-storage = { path = "../../../common/credential-storage" } -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-topology = { path = "../../../common/topology" } -nym-validator-client = { path = "../../../common/client-libs/validator-client" } - -[dev-dependencies] -ts-rs = "7.0.0" -tempfile = "3.3.0" - -[features] -default = ["custom-protocol"] -custom-protocol = ["tauri/custom-protocol"] diff --git a/nym-connect/desktop/src-tauri/icons/128x128.png b/nym-connect/desktop/src-tauri/icons/128x128.png deleted file mode 100644 index 12daccf30f..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/128x128.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/128x128@2x.png b/nym-connect/desktop/src-tauri/icons/128x128@2x.png deleted file mode 100644 index d98b024d26..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/128x128@2x.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/32x32.png b/nym-connect/desktop/src-tauri/icons/32x32.png deleted file mode 100644 index 5463a8ff1c..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/32x32.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square107x107Logo.png b/nym-connect/desktop/src-tauri/icons/Square107x107Logo.png deleted file mode 100644 index 468b6cf29b..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square107x107Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square142x142Logo.png b/nym-connect/desktop/src-tauri/icons/Square142x142Logo.png deleted file mode 100644 index ce58b768ca..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square142x142Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square150x150Logo.png b/nym-connect/desktop/src-tauri/icons/Square150x150Logo.png deleted file mode 100644 index b6bc59dfcf..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square150x150Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square284x284Logo.png b/nym-connect/desktop/src-tauri/icons/Square284x284Logo.png deleted file mode 100644 index 26311d4604..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square284x284Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square30x30Logo.png b/nym-connect/desktop/src-tauri/icons/Square30x30Logo.png deleted file mode 100644 index 8916d14e49..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square30x30Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square310x310Logo.png b/nym-connect/desktop/src-tauri/icons/Square310x310Logo.png deleted file mode 100644 index 6fd3c36def..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square310x310Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square44x44Logo.png b/nym-connect/desktop/src-tauri/icons/Square44x44Logo.png deleted file mode 100644 index e161bd7c4a..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square44x44Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square71x71Logo.png b/nym-connect/desktop/src-tauri/icons/Square71x71Logo.png deleted file mode 100644 index 45b5126bf6..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square71x71Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/Square89x89Logo.png b/nym-connect/desktop/src-tauri/icons/Square89x89Logo.png deleted file mode 100644 index 386c8bf119..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/Square89x89Logo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/StoreLogo.png b/nym-connect/desktop/src-tauri/icons/StoreLogo.png deleted file mode 100644 index 692f1a03f2..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/StoreLogo.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/icon.icns b/nym-connect/desktop/src-tauri/icons/icon.icns deleted file mode 100644 index 129da9bf18..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/icon.icns and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/icon.ico b/nym-connect/desktop/src-tauri/icons/icon.ico deleted file mode 100644 index 6164f98f9c..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/icon.ico and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/icon.png b/nym-connect/desktop/src-tauri/icons/icon.png deleted file mode 100644 index fa552c309a..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/icon.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/tray_icon.ico b/nym-connect/desktop/src-tauri/icons/tray_icon.ico deleted file mode 100644 index 25785da3d9..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/tray_icon.ico and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/icons/tray_icon.png b/nym-connect/desktop/src-tauri/icons/tray_icon.png deleted file mode 100644 index afcb965219..0000000000 Binary files a/nym-connect/desktop/src-tauri/icons/tray_icon.png and /dev/null differ diff --git a/nym-connect/desktop/src-tauri/src/build.rs b/nym-connect/desktop/src-tauri/src/build.rs deleted file mode 100644 index 7c65873b94..0000000000 --- a/nym-connect/desktop/src-tauri/src/build.rs +++ /dev/null @@ -1,16 +0,0 @@ -use std::env; - -mod constants; - -use constants::{SENTRY_DSN_JS, SENTRY_DSN_RUST}; - -fn main() { - // set these env vars at compile time - if let Ok(dsn) = env::var(SENTRY_DSN_RUST) { - println!("cargo:rustc-env={}={}", SENTRY_DSN_RUST, dsn); - } - if let Ok(dsn) = env::var(SENTRY_DSN_JS) { - println!("cargo:rustc-env={}={}", SENTRY_DSN_JS, dsn); - } - tauri_build::build(); -} diff --git a/nym-connect/desktop/src-tauri/src/config/mod.rs b/nym-connect/desktop/src-tauri/src/config/mod.rs deleted file mode 100644 index a5a39ab0c5..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/mod.rs +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright 2022-2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::persistence::NymConnectPaths; -use crate::config::template::CONFIG_TEMPLATE; -use crate::config::upgrade::try_upgrade_config; -use crate::error::{BackendError, Result}; -use nym_client_core::client::base_client::non_wasm_helpers::setup_fs_gateways_storage; -use nym_client_core::client::base_client::storage::gateways_storage::{ - GatewayDetails, RemoteGatewayDetails, -}; -use nym_client_core::client::key_manager::persistence::OnDiskKeys; -use nym_client_core::error::ClientCoreError; -use nym_client_core::init::generate_new_client_keys; -use nym_client_core::init::helpers::current_gateways; -use nym_client_core::init::types::{GatewaySelectionSpecification, GatewaySetup}; -use nym_config::{ - must_get_home, read_config_from_toml_file, save_formatted_config_to_file, NymConfigTemplate, - DEFAULT_CONFIG_DIR, DEFAULT_CONFIG_FILENAME, DEFAULT_DATA_DIR, NYM_DIR, -}; -use nym_crypto::asymmetric::identity; -use nym_socks5_client_core::config::Config as Socks5CoreConfig; -use rand::rngs::OsRng; -use serde::{Deserialize, Serialize}; -use std::path::{Path, PathBuf}; -use std::{fs, io}; -use tap::TapFallible; - -mod old_config_v1_1_13; -mod old_config_v1_1_20; -mod old_config_v1_1_20_2; -mod old_config_v1_1_30; -mod old_config_v1_1_33; -mod persistence; -mod template; -mod upgrade; -mod user_data; - -pub use user_data::*; - -static SOCKS5_CONFIG_ID: &str = "nym-connect"; - -// backwards compatibility : ) -const DEFAULT_NYM_CONNECT_CLIENTS_DIR: &str = "socks5-clients"; - -/// Derive default path to clients's config directory. -/// It should get resolved to `$HOME/.nym/socks5-clients//config` -pub fn default_config_directory>(id: P) -> PathBuf { - must_get_home() - .join(NYM_DIR) - .join(DEFAULT_NYM_CONNECT_CLIENTS_DIR) - .join(id) - .join(DEFAULT_CONFIG_DIR) -} - -/// Derive default path to client's config file. -/// It should get resolved to `$HOME/.nym/socks5-clients//config/config.toml` -pub fn default_config_filepath>(id: P) -> PathBuf { - default_config_directory(id).join(DEFAULT_CONFIG_FILENAME) -} - -/// Derive default path to nym connects's data directory where files, such as keys, are stored. -/// It should get resolved to `$HOME/.nym/socks5-clients//data` -pub fn default_data_directory>(id: P) -> PathBuf { - must_get_home() - .join(NYM_DIR) - .join(DEFAULT_NYM_CONNECT_CLIENTS_DIR) - .join(id) - .join(DEFAULT_DATA_DIR) -} - -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -pub struct Config { - pub core: Socks5CoreConfig, - - pub storage_paths: NymConnectPaths, -} - -impl NymConfigTemplate for Config { - fn template(&self) -> &'static str { - CONFIG_TEMPLATE - } -} - -pub fn socks5_config_id_appended_with(gateway_id: &str) -> String { - format!("{SOCKS5_CONFIG_ID}-{gateway_id}") -} - -impl Config { - pub fn new>(id: S, provider_mix_address: S) -> Self { - Config { - core: Socks5CoreConfig::new( - id.as_ref(), - env!("CARGO_PKG_VERSION"), - provider_mix_address.as_ref(), - ), - storage_paths: NymConnectPaths::new_default(default_data_directory(id.as_ref())), - } - } - - pub fn read_from_toml_file>(path: P) -> io::Result { - read_config_from_toml_file(path) - } - - pub fn read_from_default_path>(id: P) -> io::Result { - Self::read_from_toml_file(default_config_filepath(id)) - } - - pub fn default_location(&self) -> PathBuf { - default_config_filepath(&self.core.base.client.id) - } - - pub fn save_to_default_location(&self) -> io::Result<()> { - let config_save_location: PathBuf = self.default_location(); - save_formatted_config_to_file(self, config_save_location) - } - - pub async fn init(service_provider: &str, chosen_gateway_id: &str) -> Result<()> { - 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. - // JS: why are we spawning a new thread here? - 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(()) - } -} - -fn init_paths(id: &str) -> io::Result<()> { - fs::create_dir_all(default_data_directory(id))?; - fs::create_dir_all(default_config_directory(id)) -} - -fn try_extract_version_for_upgrade_failure(err: BackendError) -> Option { - if let BackendError::ClientCoreError { - source: ClientCoreError::UnableToUpgradeConfigFile { new_version }, - } = err - { - Some(new_version) - } else { - None - } -} - -pub async fn init_socks5_config(provider_address: String, chosen_gateway_id: String) -> Result<()> { - log::trace!("Initialising client..."); - - // Append the gateway id to the name id that we store the config under - let id = socks5_config_id_appended_with(&chosen_gateway_id); - let _validated = identity::PublicKey::from_base58_string(&chosen_gateway_id) - .map_err(|_| BackendError::UnableToParseGateway)?; - - let config_path = default_config_filepath(&id); - let already_init = if config_path.exists() { - // in case we're using old config, try to upgrade it - // (if we're using the current version, it's a no-op) - if let Err(err) = try_upgrade_config(&id).await { - log::error!( - "Failed to upgrade config file {}: {err}", - config_path.display(), - ); - return if let Some(failed_at_version) = try_extract_version_for_upgrade_failure(err) { - Err( - BackendError::CouldNotUpgradeExistingConfigurationFileAtVersion { - file: config_path, - failed_at_version, - }, - ) - } else { - Err(BackendError::CouldNotUpgradeExistingConfigurationFile { file: config_path }) - }; - }; - eprintln!("SOCKS5 client \"{id}\" was already initialised before"); - true - } else { - init_paths(&id)?; - false - }; - - // // Future proofing. This flag exists for the other clients - // let user_wants_force_register = false; - - log::trace!("Creating config for id: {id}"); - let mut config = Config::new(&id, &provider_address); - - if let Ok(raw_validators) = std::env::var(nym_config::defaults::var_names::NYM_API) { - config.core.base.client.nym_api_urls = nym_config::parse_urls(&raw_validators); - } - - let key_store = OnDiskKeys::new(config.storage_paths.common_paths.keys.clone()); - let details_store = - setup_fs_gateways_storage(&config.storage_paths.common_paths.gateway_registrations).await?; - - // if this is a first time client with this particular id is initialised, generated long-term keys - if !already_init { - let mut rng = OsRng; - generate_new_client_keys(&mut rng, &key_store).await?; - } - - let gateway_setup = if !already_init { - let selection_spec = - GatewaySelectionSpecification::new(Some(chosen_gateway_id), None, false); - let mut rng = rand::thread_rng(); - let available_gateways = - current_gateways(&mut rng, &config.core.base.client.nym_api_urls).await?; - GatewaySetup::New { - specification: selection_spec, - available_gateways, - wg_tun_address: None, - } - } else { - GatewaySetup::MustLoad { - gateway_id: Some(chosen_gateway_id), - } - }; - - let init_details = - nym_client_core::init::setup_gateway(gateway_setup, &key_store, &details_store).await?; - - let GatewayDetails::Remote(gateway_details) = &init_details.gateway_registration.details else { - return Err(ClientCoreError::UnexpectedPersistedCustomGatewayDetails)?; - }; - - config.save_to_default_location().tap_err(|_| { - log::error!("Failed to save the config file"); - })?; - - print_saved_config(&config, gateway_details); - - let address = init_details.client_address(); - log::info!("The address of this client is: {address}"); - Ok(()) -} - -fn print_saved_config(config: &Config, gateway_details: &RemoteGatewayDetails) { - log::info!( - "Saved configuration file to {}", - config.default_location().display() - ); - log::info!("Gateway id: {}", gateway_details.gateway_id); - if let Some(owner) = gateway_details.gateway_owner_address.as_ref() { - log::info!("Gateway owner: {owner}"); - } - log::info!("Gateway listener: {}", gateway_details.gateway_listener); - log::info!( - "Service provider address: {}", - config.core.socks5.provider_mix_address - ); - log::info!( - "Service provider port: {}", - config.core.socks5.bind_address.port() - ); - log::info!("Client configuration completed."); -} diff --git a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_13.rs b/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_13.rs deleted file mode 100644 index 954632a0c1..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_13.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::old_config_v1_1_20::{ConfigV1_1_20, Socks5V1_1_20}; -use nym_client_core::config::old_config_v1_1_13::OldConfigV1_1_13 as OldBaseConfigV1_1_13; -use nym_config::legacy_helpers::nym_config::MigrationNymConfig; -use nym_config::must_get_home; -use serde::{Deserialize, Serialize}; -use std::path::PathBuf; - -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct OldConfigV1_1_13 { - #[serde(flatten)] - pub base: OldBaseConfigV1_1_13, - - pub socks5: Socks5V1_1_20, -} - -impl MigrationNymConfig for OldConfigV1_1_13 { - fn default_root_directory() -> PathBuf { - #[cfg(not(any(target_os = "android", target_os = "ios")))] - let base_dir = must_get_home(); - #[cfg(any(target_os = "android", target_os = "ios"))] - let base_dir = PathBuf::from("/tmp"); - - base_dir.join(".nym").join("socks5-clients") - } -} - -impl From for ConfigV1_1_20 { - fn from(value: OldConfigV1_1_13) -> Self { - ConfigV1_1_20 { - base: value.base.into(), - socks5: value.socks5, - } - } -} diff --git a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_20.rs b/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_20.rs deleted file mode 100644 index fbad434c68..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_20.rs +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2021-2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::old_config_v1_1_20_2::{ - ConfigV1_1_20_2, CoreConfigV1_1_20_2, SocksClientPathsV1_1_20_2, -}; -use nym_bin_common::logging::LoggingSettings; -use nym_client_core::config::disk_persistence::old_v1_1_20_2::CommonClientPathsV1_1_20_2; -use nym_client_core::config::disk_persistence::old_v1_1_33::ClientKeysPathsV1_1_33; -use nym_client_core::config::old_config_v1_1_20::ConfigV1_1_20 as BaseConfigV1_1_20; -use nym_client_core::config::old_config_v1_1_20_2::ClientV1_1_20_2; -use nym_config::legacy_helpers::nym_config::MigrationNymConfig; -use nym_config::must_get_home; -use nym_socks5_client_core::config::old_config_v1_1_20_2::{ - BaseClientConfigV1_1_20_2, Socks5DebugV1_1_20_2, Socks5V1_1_20_2, -}; -use nym_socks5_client_core::config::{ProviderInterfaceVersion, Socks5ProtocolVersion}; -use serde::{Deserialize, Serialize}; -use std::fmt::Debug; -use std::path::PathBuf; - -const DEFAULT_CONNECTION_START_SURBS: u32 = 20; -const DEFAULT_PER_REQUEST_SURBS: u32 = 3; - -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct ConfigV1_1_20 { - #[serde(flatten)] - pub base: BaseConfigV1_1_20, - - pub socks5: Socks5V1_1_20, -} - -impl From for ConfigV1_1_20_2 { - fn from(value: ConfigV1_1_20) -> Self { - ConfigV1_1_20_2 { - core: CoreConfigV1_1_20_2 { - base: BaseClientConfigV1_1_20_2 { - client: ClientV1_1_20_2 { - version: value.base.client.version, - id: value.base.client.id, - disabled_credentials_mode: value.base.client.disabled_credentials_mode, - nyxd_urls: value.base.client.nyxd_urls, - nym_api_urls: value.base.client.nym_api_urls, - gateway_endpoint: value.base.client.gateway_endpoint.into(), - }, - debug: value.base.debug.into(), - }, - socks5: value.socks5.into(), - }, - storage_paths: SocksClientPathsV1_1_20_2 { - common_paths: CommonClientPathsV1_1_20_2 { - keys: ClientKeysPathsV1_1_33 { - private_identity_key_file: value.base.client.private_identity_key_file, - public_identity_key_file: value.base.client.public_identity_key_file, - private_encryption_key_file: value.base.client.private_encryption_key_file, - public_encryption_key_file: value.base.client.public_encryption_key_file, - gateway_shared_key_file: value.base.client.gateway_shared_key_file, - ack_key_file: value.base.client.ack_key_file, - }, - credentials_database: value.base.client.database_path, - reply_surb_database: value.base.client.reply_surb_database_path, - }, - }, - logging: LoggingSettings::default(), - } - } -} - -impl MigrationNymConfig for ConfigV1_1_20 { - fn default_root_directory() -> PathBuf { - #[cfg(not(any(target_os = "android", target_os = "ios")))] - let base_dir = must_get_home(); - #[cfg(any(target_os = "android", target_os = "ios"))] - let base_dir = PathBuf::from("/tmp"); - - base_dir.join(".nym").join("socks5-clients") - } -} - -#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct Socks5V1_1_20 { - pub listening_port: u16, - - pub provider_mix_address: String, - - #[serde(default = "ProviderInterfaceVersion::new_legacy")] - pub provider_interface_version: ProviderInterfaceVersion, - - #[serde(default = "Socks5ProtocolVersion::new_legacy")] - pub socks5_protocol_version: Socks5ProtocolVersion, - - #[serde(default)] - pub send_anonymously: bool, - - #[serde(default)] - pub socks5_debug: Socks5DebugV1_1_20, -} - -impl From for Socks5V1_1_20_2 { - fn from(value: Socks5V1_1_20) -> Self { - Socks5V1_1_20_2 { - listening_port: value.listening_port, - provider_mix_address: value.provider_mix_address, - provider_interface_version: value.provider_interface_version, - socks5_protocol_version: value.socks5_protocol_version, - send_anonymously: value.send_anonymously, - socks5_debug: value.socks5_debug.into(), - } - } -} - -#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct Socks5DebugV1_1_20 { - connection_start_surbs: u32, - per_request_surbs: u32, -} - -impl From for Socks5DebugV1_1_20_2 { - fn from(value: Socks5DebugV1_1_20) -> Self { - Socks5DebugV1_1_20_2 { - connection_start_surbs: value.connection_start_surbs, - per_request_surbs: value.per_request_surbs, - } - } -} - -impl Default for Socks5DebugV1_1_20 { - fn default() -> Self { - Socks5DebugV1_1_20 { - connection_start_surbs: DEFAULT_CONNECTION_START_SURBS, - per_request_surbs: DEFAULT_PER_REQUEST_SURBS, - } - } -} diff --git a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_20_2.rs b/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_20_2.rs deleted file mode 100644 index 6af24d249a..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_20_2.rs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::default_config_filepath; -use crate::config::old_config_v1_1_30::ConfigV1_1_30; -use crate::config::old_config_v1_1_33::NymConnectPathsV1_1_33; -use crate::error::Result; -use nym_bin_common::logging::LoggingSettings; -use nym_client_core::config::disk_persistence::old_v1_1_20_2::CommonClientPathsV1_1_20_2; -use nym_client_core::config::old_config_v1_1_33::OldGatewayEndpointConfigV1_1_33; -use nym_config::read_config_from_toml_file; -use serde::{Deserialize, Serialize}; -use std::io; -use std::path::Path; - -pub use nym_socks5_client_core::config::old_config_v1_1_20_2::ConfigV1_1_20_2 as CoreConfigV1_1_20_2; - -#[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone)] -pub struct SocksClientPathsV1_1_20_2 { - #[serde(flatten)] - pub common_paths: CommonClientPathsV1_1_20_2, -} - -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct ConfigV1_1_20_2 { - pub core: CoreConfigV1_1_20_2, - - pub storage_paths: SocksClientPathsV1_1_20_2, - - pub logging: LoggingSettings, -} - -impl ConfigV1_1_20_2 { - pub fn read_from_toml_file>(path: P) -> io::Result { - read_config_from_toml_file(path) - } - - pub fn read_from_default_path>(id: P) -> io::Result { - Self::read_from_toml_file(default_config_filepath(id)) - } - - // in this upgrade, gateway endpoint configuration was moved out of the config file, - // so its returned to be stored elsewhere. - pub fn upgrade(self) -> Result<(ConfigV1_1_30, OldGatewayEndpointConfigV1_1_33)> { - let gateway_details = self.core.base.client.gateway_endpoint.clone().into(); - let config = ConfigV1_1_30 { - core: self.core.into(), - storage_paths: NymConnectPathsV1_1_33 { - common_paths: self.storage_paths.common_paths.upgrade_default()?, - }, - // logging: self.logging, - }; - - Ok((config, gateway_details)) - } -} diff --git a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_30.rs b/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_30.rs deleted file mode 100644 index 3d64011c8c..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_30.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright 2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::default_config_filepath; -use crate::config::old_config_v1_1_33::{ConfigV1_1_33, NymConnectPathsV1_1_33}; -use nym_config::read_config_from_toml_file; -use nym_socks5_client_core::config::old_config_v1_1_30::ConfigV1_1_30 as CoreConfigV1_1_30; -use serde::{Deserialize, Serialize}; -use std::io; -use std::path::Path; - -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct ConfigV1_1_30 { - pub core: CoreConfigV1_1_30, - - pub storage_paths: NymConnectPathsV1_1_33, -} - -impl From for ConfigV1_1_33 { - fn from(value: ConfigV1_1_30) -> Self { - ConfigV1_1_33 { - core: value.core.into(), - storage_paths: value.storage_paths, - } - } -} - -impl ConfigV1_1_30 { - pub fn read_from_toml_file>(path: P) -> io::Result { - read_config_from_toml_file(path) - } - - pub fn read_from_default_path>(id: P) -> io::Result { - Self::read_from_toml_file(default_config_filepath(id)) - } -} diff --git a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_33.rs b/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_33.rs deleted file mode 100644 index 15de9d1750..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/old_config_v1_1_33.rs +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2024 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::persistence::NymConnectPaths; -use crate::config::{default_config_filepath, Config}; -use crate::error::BackendError; -use nym_client_core::config::disk_persistence::old_v1_1_33::CommonClientPathsV1_1_33; -use nym_config::read_config_from_toml_file; -use nym_socks5_client_core::config::old_config_v1_1_33::ConfigV1_1_33 as CoreConfigV1_1_33; -use serde::{Deserialize, Serialize}; -use std::io; -use std::path::Path; - -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -pub struct NymConnectPathsV1_1_33 { - #[serde(flatten)] - pub common_paths: CommonClientPathsV1_1_33, -} - -#[derive(Clone, Debug, Deserialize, PartialEq, Serialize)] -#[serde(deny_unknown_fields)] -pub struct ConfigV1_1_33 { - pub core: CoreConfigV1_1_33, - - // \/ CHANGED - pub storage_paths: NymConnectPathsV1_1_33, - // /\ CHANGED -} - -impl ConfigV1_1_33 { - pub fn read_from_toml_file>(path: P) -> io::Result { - read_config_from_toml_file(path) - } - - pub fn read_from_default_path>(id: P) -> io::Result { - Self::read_from_toml_file(default_config_filepath(id)) - } - - pub fn try_upgrade(self) -> Result { - Ok(Config { - core: self.core.into(), - storage_paths: NymConnectPaths { - common_paths: self.storage_paths.common_paths.upgrade_default()?, - }, - }) - } -} diff --git a/nym-connect/desktop/src-tauri/src/config/persistence.rs b/nym-connect/desktop/src-tauri/src/config/persistence.rs deleted file mode 100644 index 69b311d474..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/persistence.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use nym_client_core::config::disk_persistence::CommonClientPaths; -use serde::{Deserialize, Serialize}; -use std::path::Path; - -#[derive(Debug, Deserialize, PartialEq, Eq, Serialize, Clone)] -pub struct NymConnectPaths { - #[serde(flatten)] - pub common_paths: CommonClientPaths, -} - -impl NymConnectPaths { - pub fn new_default>(base_data_directory: P) -> Self { - NymConnectPaths { - common_paths: CommonClientPaths::new_base(base_data_directory), - } - } -} diff --git a/nym-connect/desktop/src-tauri/src/config/template.rs b/nym-connect/desktop/src-tauri/src/config/template.rs deleted file mode 100644 index 3de6a1be5e..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/template.rs +++ /dev/null @@ -1,116 +0,0 @@ -// Copyright 2021-2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -// While using normal toml marshalling would have been way simpler with less overhead, -// I think it's useful to have comments attached to the saved config file to explain behaviour of -// particular fields. -// Note: any changes to the template must be reflected in the appropriate structs. -pub(crate) const CONFIG_TEMPLATE: &str = r#" -# This is a TOML config file. -# For more information, see https://github.com/toml-lang/toml - -##### main base client config options ##### - -[core.client] -# Version of the client for which this configuration was created. -version = '{{ core.client.version }}' - -# Human readable ID of this particular client. -id = '{{ core.client.id }}' - -# Indicates whether this client is running in a disabled credentials mode, thus attempting -# to claim bandwidth without presenting bandwidth credentials. -disabled_credentials_mode = {{ core.client.disabled_credentials_mode }} - -# Addresses to nyxd validators via which the client can communicate with the chain. -nyxd_urls = [ - {{#each core.client.nyxd_urls }} - '{{this}}', - {{/each}} -] - -# Addresses to APIs running on validator from which the client gets the view of the network. -nym_api_urls = [ - {{#each core.client.nym_api_urls }} - '{{this}}', - {{/each}} -] - -[storage_paths] - -# Path to file containing private identity key. -keys.private_identity_key_file = '{{ storage_paths.keys.private_identity_key_file }}' - -# Path to file containing public identity key. -keys.public_identity_key_file = '{{ storage_paths.keys.public_identity_key_file }}' - -# Path to file containing private encryption key. -keys.private_encryption_key_file = '{{ storage_paths.keys.private_encryption_key_file }}' - -# Path to file containing public encryption key. -keys.public_encryption_key_file = '{{ storage_paths.keys.public_encryption_key_file }}' - -# A gateway specific, optional, base58 stringified shared key used for -# communication with particular gateway. -keys.gateway_shared_key_file = '{{ storage_paths.keys.gateway_shared_key_file }}' - -# Path to file containing key used for encrypting and decrypting the content of an -# acknowledgement so that nobody besides the client knows which packet it refers to. -keys.ack_key_file = '{{ storage_paths.keys.ack_key_file }}' - -# Path to the database containing bandwidth credentials -credentials_database = '{{ storage_paths.credentials_database }}' - -# Path to the persistent store for received reply surbs, unused encryption keys and used sender tags. -reply_surb_database = '{{ storage_paths.reply_surb_database }}' - -# Path to the file containing information about gateway used by this client, -# i.e. details such as its public key, owner address or the network information. -gateway_details = '{{ storage_paths.gateway_details }}' - - -##### socket config options ##### - -[core.socks5] - -# The mix address of the provider to which all requests are going to be sent. -provider_mix_address = '{{ core.socks5.provider_mix_address }}' - -# The address on which the client will be listening for incoming requests -# (default: 127.0.0.1:1080) -bind_address = '{{ core.socks5.bind_address }}' - -# Specifies whether this client is going to use an anonymous sender tag for communication with the service provider. -# While this is going to hide its actual address information, it will make the actual communication -# slower and consume nearly double the bandwidth as it will require sending reply SURBs. -# -# Note that some service providers might not support this. -send_anonymously = {{ core.socks5.send_anonymously }} - -##### logging configuration options ##### - -[logging] - -# TODO - - -##### debug configuration options ##### -# The following options should not be modified unless you know EXACTLY what you are doing -# as if set incorrectly, they may impact your anonymity. - -# [core.socks5.socks5_debug] - - -[core.debug] - -[core.debug.traffic] -average_packet_delay = '{{ core.debug.traffic.average_packet_delay }}' -message_sending_average_delay = '{{ core.debug.traffic.message_sending_average_delay }}' - -[core.debug.acknowledgements] -average_ack_delay = '{{ core.debug.acknowledgements.average_ack_delay }}' - -[core.debug.cover_traffic] -loop_cover_traffic_average_delay = '{{ core.debug.cover_traffic.loop_cover_traffic_average_delay }}' - -"#; diff --git a/nym-connect/desktop/src-tauri/src/config/upgrade.rs b/nym-connect/desktop/src-tauri/src/config/upgrade.rs deleted file mode 100644 index 8df77ab7b6..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/upgrade.rs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright 2022-2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::old_config_v1_1_30::ConfigV1_1_30; -use crate::config::old_config_v1_1_33::ConfigV1_1_33; -use crate::{ - config::{ - old_config_v1_1_13::OldConfigV1_1_13, old_config_v1_1_20::ConfigV1_1_20, - old_config_v1_1_20_2::ConfigV1_1_20_2, - }, - error::Result, -}; -use log::{debug, info}; -use nym_client_core::client::base_client::storage::migration_helpers::v1_1_33; - -async fn try_upgrade_v1_1_13_config(id: &str) -> Result { - use nym_config::legacy_helpers::nym_config::MigrationNymConfig; - - // explicitly load it as v1.1.13 (which is incompatible with the next step, i.e. 1.1.19) - let Ok(old_config) = OldConfigV1_1_13::load_from_file(id) else { - // if we failed to load it, there might have been nothing to upgrade - // or maybe it was an even older file. in either way. just ignore it and carry on with our day - return Ok(false); - }; - info!("It seems the client is using <= v1.1.13 config template."); - info!("It is going to get updated to the current specification."); - - let updated_step1: ConfigV1_1_20 = old_config.into(); - let updated_step2: ConfigV1_1_20_2 = updated_step1.into(); - let (updated_step3, gateway_config) = updated_step2.upgrade()?; - let old_paths = updated_step3.storage_paths.clone(); - - let updated_step4: ConfigV1_1_33 = updated_step3.into(); - let updated = updated_step4.try_upgrade()?; - - v1_1_33::migrate_gateway_details( - &old_paths.common_paths, - &updated.storage_paths.common_paths, - Some(gateway_config), - ) - .await?; - - updated.save_to_default_location()?; - Ok(true) -} - -async fn try_upgrade_v1_1_20_config(id: &str) -> Result { - use nym_config::legacy_helpers::nym_config::MigrationNymConfig; - - // explicitly load it as v1.1.20 (which is incompatible with the current one, i.e. +1.1.21) - let Ok(old_config) = ConfigV1_1_20::load_from_file(id) else { - // if we failed to load it, there might have been nothing to upgrade - // or maybe it was an even older file. in either way. just ignore it and carry on with our day - return Ok(false); - }; - info!("It seems the client is using <= v1.1.20 config template."); - info!("It is going to get updated to the current specification."); - - let updated_step1: ConfigV1_1_20_2 = old_config.into(); - let (updated_step2, gateway_config) = updated_step1.upgrade()?; - let old_paths = updated_step2.storage_paths.clone(); - - let updated_step3: ConfigV1_1_33 = updated_step2.into(); - let updated = updated_step3.try_upgrade()?; - - v1_1_33::migrate_gateway_details( - &old_paths.common_paths, - &updated.storage_paths.common_paths, - Some(gateway_config), - ) - .await?; - - updated.save_to_default_location()?; - Ok(true) -} - -async fn try_upgrade_v1_1_20_2_config(id: &str) -> Result { - // explicitly load it as v1.1.20_2 (which is incompatible with the current one, i.e. +1.1.21) - let Ok(old_config) = ConfigV1_1_20_2::read_from_default_path(id) else { - // if we failed to load it, there might have been nothing to upgrade - // or maybe it was an even older file. in either way. just ignore it and carry on with our day - return Ok(false); - }; - info!("It seems the client is using <= v1.1.20_2 config template."); - info!("It is going to get updated to the current specification."); - - let (updated_step1, gateway_config) = old_config.upgrade()?; - let old_paths = updated_step1.storage_paths.clone(); - - let updated_step2: ConfigV1_1_33 = updated_step1.into(); - let updated = updated_step2.try_upgrade()?; - - v1_1_33::migrate_gateway_details( - &old_paths.common_paths, - &updated.storage_paths.common_paths, - Some(gateway_config), - ) - .await?; - - updated.save_to_default_location()?; - Ok(true) -} - -async fn try_upgrade_v1_1_30_config(id: &str) -> Result { - // explicitly load it as v1.1.20_2 (which is incompatible with the current one, i.e. +1.1.21) - let Ok(old_config) = ConfigV1_1_30::read_from_default_path(id) else { - // if we failed to load it, there might have been nothing to upgrade - // or maybe it was an even older file. in either way. just ignore it and carry on with our day - return Ok(false); - }; - info!("It seems the client is using <= v1.1.30 config template."); - info!("It is going to get updated to the current specification."); - - let old_paths = old_config.storage_paths.clone(); - - let updated_step1: ConfigV1_1_33 = old_config.into(); - let updated = updated_step1.try_upgrade()?; - - v1_1_33::migrate_gateway_details( - &old_paths.common_paths, - &updated.storage_paths.common_paths, - None, - ) - .await?; - - updated.save_to_default_location()?; - Ok(true) -} - -async fn try_upgrade_v1_1_33_config(id: &str) -> Result { - // explicitly load it as v1.1.33 (which is incompatible with the current one, i.e. +1.1.34) - let Ok(old_config) = ConfigV1_1_33::read_from_default_path(id) else { - // if we failed to load it, there might have been nothing to upgrade - // or maybe it was an even older file. in either way. just ignore it and carry on with our day - return Ok(false); - }; - info!("It seems the client is using <= v1.1.33 config template."); - info!("It is going to get updated to the current specification."); - - let old_paths = old_config.storage_paths.clone(); - - let updated = old_config.try_upgrade()?; - - v1_1_33::migrate_gateway_details( - &old_paths.common_paths, - &updated.storage_paths.common_paths, - None, - ) - .await?; - - updated.save_to_default_location()?; - Ok(true) -} - -pub async fn try_upgrade_config(id: &str) -> Result<()> { - debug!("Attempting to upgrade config file for \"{id}\""); - if try_upgrade_v1_1_13_config(id).await? { - return Ok(()); - } - if try_upgrade_v1_1_20_config(id).await? { - return Ok(()); - } - if try_upgrade_v1_1_20_2_config(id).await? { - return Ok(()); - } - if try_upgrade_v1_1_30_config(id).await? { - return Ok(()); - } - if try_upgrade_v1_1_33_config(id).await? { - return Ok(()); - } - - Ok(()) -} diff --git a/nym-connect/desktop/src-tauri/src/config/user_data.rs b/nym-connect/desktop/src-tauri/src/config/user_data.rs deleted file mode 100644 index e7ac9000b6..0000000000 --- a/nym-connect/desktop/src-tauri/src/config/user_data.rs +++ /dev/null @@ -1,93 +0,0 @@ -use eyre::{eyre, Context, Result}; -use log::error; -use serde::{Deserialize, Serialize}; -use std::{fs, str}; -use tauri::api::path::data_dir; - -const DATA_DIR: &str = "nym-connect"; -const DATA_FILE: &str = "user-data.toml"; - -#[derive(Serialize, Deserialize, Debug, Copy, Clone, Default)] -pub enum PrivacyLevel { - #[default] - High, - Medium, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -pub struct SelectedGateway { - address: Option, - is_active: Option, -} - -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -pub struct SelectedSp { - address: Option, - is_active: Option, -} - -// User data is read from and write on disk -// Linux: $XDG_DATA_HOME or $HOME/.local/share/ -// macOS: $HOME/Library/Application Support -// Windows: {FOLDERID_RoamingAppData} -#[derive(Serialize, Deserialize, Debug, Clone, Default)] -pub struct UserData { - pub monitoring: Option, - pub privacy_level: Option, - pub selected_gateway: Option, - pub selected_sp: Option, -} - -fn create_directory_path() -> Result<()> { - let mut data_dir = data_dir().ok_or(eyre!("Failed to retrieve data directory"))?; - data_dir.push(DATA_DIR); - - fs::create_dir_all(&data_dir).context(format!( - "Failed to create user data directory path {}", - data_dir.display() - )) -} - -impl UserData { - pub fn read() -> Result { - // create the full directory path if it is missing - create_directory_path()?; - - let mut data_path = data_dir().ok_or(eyre!("Failed to retrieve data directory"))?; - - data_path.push(DATA_DIR); - data_path.push(DATA_FILE); - let content = fs::read(&data_path) - .context(format!("Failed to read user data {}", data_path.display()))?; - - toml::from_str::(str::from_utf8(&content)?).map_err(|e| { - error!("{}", e); - eyre!("{e}") - }) - } - - pub fn write(&self) -> Result<()> { - // create the full directory path if it is missing - create_directory_path()?; - - let mut data_path = data_dir().ok_or(eyre!("Failed to retrieve data directory"))?; - - data_path.push(DATA_DIR); - data_path.push(DATA_FILE); - let toml = toml::to_string(&self)?; - fs::write(data_path, toml)?; - Ok(()) - } - - pub fn clear(&self) -> Result<()> { - // create the full directory path if it is missing - create_directory_path()?; - - let mut data_path = data_dir().ok_or(eyre!("Failed to retrieve data directory"))?; - - data_path.push(DATA_DIR); - data_path.push(DATA_FILE); - fs::write(data_path, vec![])?; - Ok(()) - } -} diff --git a/nym-connect/desktop/src-tauri/src/constants.rs b/nym-connect/desktop/src-tauri/src/constants.rs deleted file mode 100644 index 379fa02be8..0000000000 --- a/nym-connect/desktop/src-tauri/src/constants.rs +++ /dev/null @@ -1,3 +0,0 @@ -// env var keys -pub const SENTRY_DSN_RUST: &str = "SENTRY_DSN_RUST"; -pub const SENTRY_DSN_JS: &str = "SENTRY_DSN_JS"; diff --git a/nym-connect/desktop/src-tauri/src/error.rs b/nym-connect/desktop/src-tauri/src/error.rs deleted file mode 100644 index e8fb548942..0000000000 --- a/nym-connect/desktop/src-tauri/src/error.rs +++ /dev/null @@ -1,136 +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("{source}")] - ApiClientError { - #[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, - #[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("could not upgrade `{file}` to latest version")] - CouldNotUpgradeExistingConfigurationFile { file: std::path::PathBuf }, - #[error("could not upgrade `{file}` to latest version (failed at {failed_at_version})")] - CouldNotUpgradeExistingConfigurationFileAtVersion { - file: std::path::PathBuf, - failed_at_version: String, - }, - - #[error("no gateways found in directory")] - NoGatewaysFoundInDirectory, - #[error("no gateways found with compatible version: {0}")] - NoVersionCompatibleGatewaysFound(String), - #[error("no gateways found with acceptable performance")] - NoGatewaysWithAcceptablePerformanceFound, - - #[error("no network-requesters found in directory")] - NoServicesFoundInDirectory, - #[error("no active network-requesters found in directory")] - NoActiveServicesFound, - - #[error("unable to open a new window")] - NewWindowError, - #[error("unable to parse the specified gateway")] - UnableToParseGateway, - #[error("unable to write user data to disk")] - UserDataWriteError, - - #[error("unable to load keys: {source}")] - UnableToLoadKeys { - source: Box, - }, - - #[error(transparent)] - ConfigUpgradeFailure(#[from] nym_client_core::config::ConfigUpgradeFailure), - - #[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/desktop/src-tauri/src/events.rs b/nym-connect/desktop/src-tauri/src/events.rs deleted file mode 100644 index 09197b388d..0000000000 --- a/nym-connect/desktop/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 | TaskStatus::ReadyWithGateway(_) => { - { - 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/desktop/src-tauri/src/logging.rs b/nym-connect/desktop/src-tauri/src/logging.rs deleted file mode 100644 index b1441a5a02..0000000000 --- a/nym-connect/desktop/src-tauri/src/logging.rs +++ /dev/null @@ -1,168 +0,0 @@ -use fern::colors::{Color, ColoredLevelConfig}; -use log::Level; -use sentry::Level as SentryLevel; -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, - monitoring: bool, -) -> 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(); - })) - .chain(fern::Output::call(move |record| { - if !monitoring { - return; - } - let level = match record.level() { - Level::Error => SentryLevel::Error, - Level::Warn => SentryLevel::Warning, - Level::Info => SentryLevel::Info, - _ => SentryLevel::Debug, - }; - // only send error and warn logs to sentry - if let Level::Error | Level::Warn = record.level() { - sentry::capture_message(&record.args().to_string(), level); - }; - })); - - 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("handlebars", log::LevelFilter::Warn) - .level_for("hyper", log::LevelFilter::Warn) - .level_for("mio", log::LevelFilter::Warn) - .level_for("reqwest", log::LevelFilter::Warn) - .level_for("rustls", log::LevelFilter::Warn) - .level_for("sled", log::LevelFilter::Warn) - .level_for("tokio_reactor", log::LevelFilter::Warn) - .level_for("tokio_tungstenite", log::LevelFilter::Warn) - .level_for("tokio_util", log::LevelFilter::Warn) - .level_for("tungstenite", log::LevelFilter::Warn) - .level_for("want", 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/desktop/src-tauri/src/main.rs b/nym-connect/desktop/src-tauri/src/main.rs deleted file mode 100644 index 684c641446..0000000000 --- a/nym-connect/desktop/src-tauri/src/main.rs +++ /dev/null @@ -1,120 +0,0 @@ -#![cfg_attr( - all(not(debug_assertions), target_os = "windows"), - windows_subsystem = "windows" -)] - -use std::env; -use std::path::PathBuf; -use std::sync::Arc; - -use nym_config::defaults::setup_env; -use tauri::Manager; -use tokio::sync::RwLock; - -use crate::config::UserData; -use crate::menu::{create_tray_menu, tray_menu_event_handler}; -use crate::state::State; -use crate::window::window_toggle; - -mod config; -mod constants; -mod error; -mod events; -mod logging; -mod menu; -mod models; -mod monitoring; -mod operations; -mod state; -mod tasks; -mod window; - -fn main() { - dotenvy::dotenv().ok(); - - setup_env(env::args().nth(1).map(PathBuf::from).as_ref()); - 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() { - println!("Failed to fix PATH: {error}"); - } - - let user_data = UserData::read().unwrap_or_else(|e| { - println!("{}", e); - println!("Fallback to default"); - UserData::default() - }); - - let monitoring = user_data.monitoring.unwrap_or(false); - let mut _sentry_guard; - - if monitoring { - match monitoring::init() { - Ok(guard) => { - println!("Monitoring and error reporting enabled"); - - // we must keep the sentry guard in scope during app lifetime - _sentry_guard = guard; - } - Err(e) => { - println!("Unable to init monitoring: {e}"); - } - } - } - - let context = tauri::generate_context!(); - tauri::Builder::default() - .manage(Arc::new(RwLock::new(State::new(user_data)))) - .invoke_handler(tauri::generate_handler![ - crate::operations::config::get_config_file_location, - crate::operations::config::get_config_id, - crate::operations::common::get_env, - crate::operations::common::get_user_data, - crate::operations::common::set_monitoring, - crate::operations::common::set_privacy_level, - crate::operations::common::set_selected_gateway, - crate::operations::common::set_selected_sp, - 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::gateways::get_gateways, - crate::operations::directory::gateways::select_gateway_with_low_latency_from_list, - crate::operations::directory::services::get_services, - crate::operations::export::export_keys, - crate::operations::window::hide_window, - crate::operations::growth::test_and_earn::growth_tne_get_client_id, - crate::operations::growth::test_and_earn::growth_tne_take_part, - crate::operations::growth::test_and_earn::growth_tne_get_draws, - crate::operations::growth::test_and_earn::growth_tne_ping, - crate::operations::growth::test_and_earn::growth_tne_submit_wallet_address, - crate::operations::growth::test_and_earn::growth_tne_enter_draw, - crate::operations::growth::test_and_earn::growth_tne_toggle_window, - crate::operations::help::log::help_log_toggle_window, - ]) - .on_menu_event(|event| { - if event.menu_item_id() == menu::SHOW_LOG_WINDOW { - let _r = crate::operations::help::log::help_log_toggle_window( - event.window().app_handle(), - ); - } - if event.menu_item_id() == menu::CLEAR_STORAGE { - let _r = crate::operations::help::storage::help_clear_storage( - event.window().app_handle(), - ); - } - }) - .setup(move |app| Ok(crate::logging::setup_logging(app.app_handle(), monitoring)?)) - .system_tray(create_tray_menu()) - .on_system_tray_event(tray_menu_event_handler) - .run(context) - .expect("error while running tauri application"); -} diff --git a/nym-connect/desktop/src-tauri/src/menu.rs b/nym-connect/desktop/src-tauri/src/menu.rs deleted file mode 100644 index f98c01debb..0000000000 --- a/nym-connect/desktop/src-tauri/src/menu.rs +++ /dev/null @@ -1,63 +0,0 @@ -use tauri::{ - AppHandle, CustomMenuItem, Menu, Submenu, SystemTray, SystemTrayEvent, SystemTrayMenu, - SystemTrayMenuItem, Wry, -}; - -use crate::window_toggle; - -pub const SHOW_LOG_WINDOW: &str = "show_log_window"; -pub const CLEAR_STORAGE: &str = "clear_storage"; - -pub trait AddDefaultSubmenus { - #[allow(dead_code)] - fn add_default_app_submenus(self) -> Self; -} - -impl AddDefaultSubmenus for Menu { - fn add_default_app_submenus(self) -> Self { - let submenu = Submenu::new( - "Help", - Menu::new().add_item(CustomMenuItem::new(SHOW_LOG_WINDOW, "Show logs")), - ); - self.add_submenu(submenu) - } -} - -pub const TRAY_MENU_QUIT: &str = "quit"; -pub const TRAY_MENU_SHOW_HIDE: &str = "show-hide"; -pub const TRAY_MENU_CONNECTION: &str = "connection"; - -pub(crate) fn create_tray_menu() -> SystemTray { - let quit = CustomMenuItem::new(TRAY_MENU_QUIT, "Quit"); - let hide = CustomMenuItem::new(TRAY_MENU_SHOW_HIDE, "Hide"); - let connection = CustomMenuItem::new(TRAY_MENU_CONNECTION, "Connect"); - let tray_menu = SystemTrayMenu::new() - .add_item(hide) - .add_item(connection) - .add_native_item(SystemTrayMenuItem::Separator) - .add_item(quit); - - SystemTray::new().with_menu(tray_menu) -} - -pub(crate) fn tray_menu_event_handler(app: &AppHandle, event: SystemTrayEvent) { - match event { - SystemTrayEvent::LeftClick { position, size, .. } => { - println!("Event {position:?} {size:?}"); - } - SystemTrayEvent::MenuItemClick { id, .. } => { - println!("Event {id}"); - match id.as_str() { - TRAY_MENU_SHOW_HIDE => { - window_toggle(app); - } - TRAY_MENU_QUIT => { - // TODO: add disconnecting first - app.exit(0); - } - _ => {} - } - } - _ => {} - } -} diff --git a/nym-connect/desktop/src-tauri/src/models/mod.rs b/nym-connect/desktop/src-tauri/src/models/mod.rs deleted file mode 100644 index 92b8512ec5..0000000000 --- a/nym-connect/desktop/src-tauri/src/models/mod.rs +++ /dev/null @@ -1,123 +0,0 @@ -use std::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)] -#[serde(rename_all = "camelCase")] -pub enum ConnectionStatusKind { - 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)] -pub enum ConnectivityTestResult { - 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 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, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct PagedResult { - pub page: u32, - pub size: u32, - pub total: i32, - pub items: Vec, -} - -#[cfg_attr(test, derive(ts_rs::TS))] -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct Gateway { - pub identity: String, -} - -impl fmt::Display for Gateway { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "Gateway({})", self.identity) - } -} diff --git a/nym-connect/desktop/src-tauri/src/monitoring.rs b/nym-connect/desktop/src-tauri/src/monitoring.rs deleted file mode 100644 index e4555f3277..0000000000 --- a/nym-connect/desktop/src-tauri/src/monitoring.rs +++ /dev/null @@ -1,38 +0,0 @@ -use std::env; - -use anyhow::{Context, Result}; -use sentry::ClientInitGuard; - -use crate::constants::{SENTRY_DSN_JS, SENTRY_DSN_RUST}; - -pub fn init() -> Result { - // if these env vars were set at compile time, use their value - if let Some(v) = option_env!("SENTRY_DSN_RUST") { - env::set_var(SENTRY_DSN_RUST, v); - } - if let Some(v) = option_env!("SENTRY_DSN_JS") { - env::set_var(SENTRY_DSN_JS, v); - } - - let dsn = env::var(SENTRY_DSN_RUST).context(format!("{} env var not set", SENTRY_DSN_RUST))?; - println!("using DSN {dsn}"); - let guard = sentry::init(( - dsn, - sentry::ClientOptions { - release: sentry::release_name!(), - sample_rate: 1.0, // TODO lower this in prod - traces_sample_rate: 1.0, - ..Default::default() // TODO add data scrubbing - // see https://docs.sentry.io/platforms/rust/data-management/sensitive-data/ - }, - )); - - sentry::configure_scope(|scope| { - scope.set_user(Some(sentry::User { - id: Some("nym".into()), - ..Default::default() - })); - }); - - Ok(guard) -} diff --git a/nym-connect/desktop/src-tauri/src/operations/common.rs b/nym-connect/desktop/src-tauri/src/operations/common.rs deleted file mode 100644 index 1b8bd1d1db..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/common.rs +++ /dev/null @@ -1,56 +0,0 @@ -use crate::config::{PrivacyLevel, SelectedGateway, SelectedSp}; -use crate::error::Result; -use crate::{config::UserData, state::State}; -use std::env; -use std::sync::Arc; -use tokio::sync::RwLock; - -#[tauri::command] -pub async fn get_env(variable: String) -> Option { - let var = env::var(&variable).ok(); - log::trace!("get_env {variable} {:?}", var); - - var -} - -#[tauri::command] -pub async fn get_user_data(state: tauri::State<'_, Arc>>) -> Result { - let guard = state.read().await; - Ok(guard.get_user_data().clone()) -} - -#[tauri::command] -pub async fn set_monitoring( - enabled: bool, - state: tauri::State<'_, Arc>>, -) -> Result<()> { - let mut guard = state.write().await; - guard.set_monitoring(enabled) -} - -#[tauri::command] -pub async fn set_privacy_level( - privacy_level: PrivacyLevel, - state: tauri::State<'_, Arc>>, -) -> Result<()> { - let mut guard = state.write().await; - guard.set_privacy_level(privacy_level) -} - -#[tauri::command] -pub async fn set_selected_gateway( - gateway: Option, - state: tauri::State<'_, Arc>>, -) -> Result<()> { - let mut guard = state.write().await; - guard.set_user_selected_gateway(gateway) -} - -#[tauri::command] -pub async fn set_selected_sp( - service_provider: Option, - state: tauri::State<'_, Arc>>, -) -> Result<()> { - let mut guard = state.write().await; - guard.set_user_selected_sp(service_provider) -} diff --git a/nym-connect/desktop/src-tauri/src/operations/config/mod.rs b/nym-connect/desktop/src-tauri/src/operations/config/mod.rs deleted file mode 100644 index 5fdecb2cbd..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/config/mod.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2023 - Nym Technologies SA -// SPDX-License-Identifier: Apache-2.0 - -use crate::config::default_config_filepath; -use crate::{error::Result, state::State}; -use std::sync::Arc; -use tokio::sync::RwLock; - -#[tauri::command] -pub async fn get_config_id(state: tauri::State<'_, Arc>>) -> Result { - state.read().await.get_config_id() -} - -#[tauri::command] -pub async fn get_config_file_location( - state: tauri::State<'_, Arc>>, -) -> Result { - let id = get_config_id(state).await?; - Ok(default_config_filepath(id).display().to_string()) -} diff --git a/nym-connect/desktop/src-tauri/src/operations/connection/connect.rs b/nym-connect/desktop/src-tauri/src/operations/connection/connect.rs deleted file mode 100644 index 95a125fa30..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/connection/connect.rs +++ /dev/null @@ -1,69 +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/desktop/src-tauri/src/operations/connection/disconnect.rs b/nym-connect/desktop/src-tauri/src/operations/connection/disconnect.rs deleted file mode 100644 index b75bf49410..0000000000 --- a/nym-connect/desktop/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/desktop/src-tauri/src/operations/connection/health_check.rs b/nym-connect/desktop/src-tauri/src/operations/connection/health_check.rs deleted file mode 100644 index 8344b5805b..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/connection/health_check.rs +++ /dev/null @@ -1,30 +0,0 @@ -use crate::operations::directory::WELLKNOWN_DIR; -use nym_config::defaults::var_names::NETWORK_NAME; -use serde::{Deserialize, Serialize}; - -static HEALTH_CHECK_URL: &str = "connect/healthcheck.json"; - -#[derive(Serialize, Deserialize, Debug)] -struct ConnectionSuccess { - status: String, -} - -pub async fn run_health_check() -> bool { - log::info!("Running network health check"); - 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 - } - Ok(res) => { - log::error!("⛔⛔⛔ Healthcheck failed with status: {}", res.status); - false - } - Err(err) => { - log::error!("⛔⛔⛔ Healthcheck failed: {err}"); - false - } - } -} diff --git a/nym-connect/desktop/src-tauri/src/operations/connection/mod.rs b/nym-connect/desktop/src-tauri/src/operations/connection/mod.rs deleted file mode 100644 index 171d07cd83..0000000000 --- a/nym-connect/desktop/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/desktop/src-tauri/src/operations/connection/status.rs b/nym-connect/desktop/src-tauri/src/operations/connection/status.rs deleted file mode 100644 index 7710524fb5..0000000000 --- a/nym-connect/desktop/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/desktop/src-tauri/src/operations/directory/gateways.rs b/nym-connect/desktop/src-tauri/src/operations/directory/gateways.rs deleted file mode 100644 index b868054b66..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/directory/gateways.rs +++ /dev/null @@ -1,142 +0,0 @@ -use crate::{ - error::{BackendError, Result}, - models::Gateway, -}; -use itertools::Itertools; -use nym_api_requests::models::GatewayBondAnnotated; -use nym_bin_common::version_checker::is_minor_version_compatible; -use nym_config::defaults::var_names::NYM_API; -use nym_contracts_common::types::Percent; -use nym_topology::gateway; -use nym_validator_client::client::NymApiClientExt; -use nym_validator_client::nym_api::Client as ApiClient; -use std::str::FromStr; -use url::Url; - -// Only use gateways with a performnnce score above this -const GATEWAY_PERFORMANCE_SCORE_THRESHOLD: u64 = 90; - -async fn fetch_all_gateways() -> Result> { - let api_client = ApiClient::new(Url::from_str(&std::env::var(NYM_API)?)?, None); - let gateways = api_client.get_gateways_detailed().await?; - if gateways.is_empty() { - Err(BackendError::NoGatewaysFoundInDirectory) - } else { - Ok(gateways) - } -} - -async fn fetch_only_compatible_gateways() -> Result> { - let gateways = fetch_all_gateways().await?; - let our_version = env!("CARGO_PKG_VERSION"); - log::debug!( - "Our version that we use to filter compatible gateways: {}", - our_version - ); - let gateways: Vec<_> = gateways - .into_iter() - .filter(|g| is_minor_version_compatible(&g.gateway_bond.gateway.version, our_version)) - .collect(); - if gateways.is_empty() { - Err(BackendError::NoVersionCompatibleGatewaysFound( - our_version.to_string(), - )) - } else { - Ok(gateways) - } -} - -fn filter_out_low_performance_gateways( - gateways: Vec, -) -> Result> { - let mut filtered_gateways: Vec<_> = gateways - .iter() - .filter(|g| { - g.node_performance.most_recent - > Percent::from_percentage_value(GATEWAY_PERFORMANCE_SCORE_THRESHOLD).unwrap() - }) - .cloned() - .collect(); - - // Sometimes the most_recent is zero for all gateways (bug in nym-api?) - if filtered_gateways.is_empty() { - log::warn!( - "No gateways with recent performance score above threshold found! Using \ - last hour performance scores instead as fallback" - ); - filtered_gateways = gateways - .into_iter() - .filter(|g| { - g.node_performance.last_hour - > Percent::from_percentage_value(GATEWAY_PERFORMANCE_SCORE_THRESHOLD).unwrap() - }) - .collect(); - } - - if filtered_gateways.is_empty() { - log::error!("No gateways found! (with high enough performance score)"); - Err(BackendError::NoGatewaysWithAcceptablePerformanceFound) - } else { - Ok(filtered_gateways) - } -} - -async fn select_gateway_by_latency(gateways: Vec) -> Result { - let gateways_as_nodes: Vec = gateways - .into_iter() - .filter_map(|g| g.gateway_bond.try_into().ok()) - .collect(); - - let mut rng = rand::rngs::OsRng; - let selected_gateway = nym_client_core::init::helpers::choose_gateway_by_latency( - &mut rng, - &gateways_as_nodes, - false, - ) - .await?; - Ok(selected_gateway) -} - -// Get all gateways satisfying the performance threshold. -#[tauri::command] -pub async fn get_gateways() -> Result> { - log::trace!("Fetching gateways"); - let all_gateways = fetch_only_compatible_gateways().await?; - log::debug!("Received {} gateways", all_gateways.len()); - log::trace!("Received: {:#?}", all_gateways); - - let gateways_filtered = filter_out_low_performance_gateways(all_gateways)? - .into_iter() - .map(|g| Gateway { - identity: g.identity().clone(), - }) - .collect_vec(); - log::debug!( - "After filtering out low-performance gateways: {}", - gateways_filtered.len() - ); - log::trace!( - "Filtered: [\n\t{}\n]", - gateways_filtered.iter().join(",\n\t") - ); - - Ok(gateways_filtered) -} - -// From a given list of gateways, select the one with low latency. -#[tauri::command] -pub async fn select_gateway_with_low_latency_from_list(gateways: Vec) -> Result { - log::debug!("Selecting a gateway with low latency"); - let gateways = gateways.into_iter().map(|g| g.identity).collect_vec(); - let all_gateways = fetch_only_compatible_gateways().await?; - let gateways_union_set: Vec = all_gateways - .into_iter() - .filter(|g| gateways.contains(g.identity())) - .collect(); - let gateways_filtered = filter_out_low_performance_gateways(gateways_union_set)?; - let selected_gateway = select_gateway_by_latency(gateways_filtered).await?; - log::debug!("Selected gateway: {}", selected_gateway); - Ok(Gateway { - identity: selected_gateway.identity().to_base58_string(), - }) -} diff --git a/nym-connect/desktop/src-tauri/src/operations/directory/mod.rs b/nym-connect/desktop/src-tauri/src/operations/directory/mod.rs deleted file mode 100644 index 0259d80830..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/directory/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod gateways; -pub mod services; - -pub(crate) static WELLKNOWN_DIR: &str = "https://nymtech.net/.wellknown"; diff --git a/nym-connect/desktop/src-tauri/src/operations/directory/services.rs b/nym-connect/desktop/src-tauri/src/operations/directory/services.rs deleted file mode 100644 index 00fcad09dc..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/directory/services.rs +++ /dev/null @@ -1,140 +0,0 @@ -use crate::{ - config::PrivacyLevel, - error::{BackendError, Result}, - models::{DirectoryService, DirectoryServiceProvider, HarbourMasterService, PagedResult}, - state::State, -}; -use itertools::Itertools; -use nym_config::defaults::var_names::NETWORK_NAME; -use std::sync::Arc; -use tap::TapFallible; -use tokio::sync::RwLock; - -use super::WELLKNOWN_DIR; - -static SERVICE_PROVIDER_URL_PATH: &str = "connect/service-providers.json"; - -// List of network-requesters running with medium toggle enabled, for testing -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"; - -// We only consider network requesters with a routing score above this threshold -const SERVICE_ROUTING_SCORE_THRESHOLD: f32 = 0.9; - -// Fetch all the services from the directory (currently hardcoded, but in the future it could be a -// contract). -async fn fetch_services(privacy_level: &PrivacyLevel) -> Result> { - let services_url = match privacy_level { - PrivacyLevel::Medium => SERVICE_PROVIDER_MEDIUM_URL_PATH, - _ => SERVICE_PROVIDER_URL_PATH, - }; - - 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?; - if services_res.is_empty() { - log::error!("No services found in directory!"); - Err(BackendError::NoServicesFoundInDirectory) - } else { - Ok(services_res) - } -} - -// Fetch all the active services from harbour master -async fn query_active_services() -> Result> { - let active_services = reqwest::get(HARBOUR_MASTER_URL) - .await? - .json::>() - .await?; - if active_services.items.is_empty() { - log::error!("No active services found!"); - Err(BackendError::NoActiveServicesFound) - } else { - Ok(active_services) - } -} - -fn filter_out_inactive_services( - all_services: &[DirectoryServiceProvider], - active_services: PagedResult, -) -> Result> { - let services: Vec<_> = all_services - .iter() - .filter(|sp| { - active_services.items.iter().any(|active| { - active.service_provider_client_id == sp.address - && active.routing_score > SERVICE_ROUTING_SCORE_THRESHOLD - }) - }) - .cloned() - .collect(); - if services.is_empty() { - Err(BackendError::NoServicesFoundInDirectory) - } else { - Ok(services) - } -} - -#[tauri::command] -pub async fn get_services( - state: tauri::State<'_, Arc>>, -) -> Result> { - let guard = state.read().await; - let privacy_level = guard.get_user_data().privacy_level.unwrap_or_default(); - - log::trace!("Fetching services"); - let all_services_with_category = fetch_services(&privacy_level).await?; - - // Flatten all services into a single vector (get rid of categories) - // We currently don't care about categories, but we might in the future... - let all_services = all_services_with_category - .into_iter() - .flat_map(|sp| sp.items) - .collect_vec(); - log::debug!("Received {} services", all_services.len()); - log::trace!("Received: {:#?}", all_services); - - // Early return if we're running with medium toggle enabled - if let PrivacyLevel::Medium = privacy_level { - return Ok(all_services); - } - - // If there is a failure getting the active services, just return all of them - // TODO: get paged - log::trace!("Fetching active services"); - let Ok(active_services) = query_active_services().await else { - log::warn!("Using all services instead as fallback"); - return Ok(all_services); - }; - log::debug!( - "Received {} active services from harbourmaster", - active_services.items.len() - ); - log::trace!("Active: {:#?}", active_services); - - // From the list of all services, filter out the ones that are inactive - log::trace!("Filter out inactive and low performance"); - let filtered_services = filter_out_inactive_services(&all_services, active_services); - - // If there is a failure filtering out inactive services, just return all of them - filtered_services - .tap_ok(|services| { - log::debug!( - "After filtering out inactive and low performance: {}", - services.len() - ); - log::trace!("After filtering: {:#?}", services); - }) - .or_else(|_| { - // If for some reason harbourmaster is done, we want things to still sort of work. - log::warn!( - "After filtering, no active services found! Using all services instead as fallback" - ); - Ok(all_services) - }) -} diff --git a/nym-connect/desktop/src-tauri/src/operations/export.rs b/nym-connect/desktop/src-tauri/src/operations/export.rs deleted file mode 100644 index bf047ee84e..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/export.rs +++ /dev/null @@ -1,89 +0,0 @@ -use std::path::Path; -use std::{fs, sync::Arc}; -use tokio::sync::RwLock; - -use crate::{ - error::{BackendError, Result}, - state::State, -}; -use nym_client_core::client::key_manager::persistence::OnDiskKeys; -use nym_client_core::client::key_manager::ClientKeys; -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_config()? - }; - - let paths = config.storage_paths.common_paths.keys; - - // wtf, why are we loading EVERYTHING to just get identity key?? - let key_store = OnDiskKeys::from(paths); - let key_manager = - ClientKeys::load_keys(&key_store) - .await - .map_err(|err| BackendError::UnableToLoadKeys { - source: Box::new(err), - })?; - let identity_keypair = key_manager.identity_keypair(); - - Ok(identity_keypair) -} - -fn key_filename>(path: P) -> Result { - path.as_ref() - .file_name() - .ok_or(BackendError::CouldNotGetFilename)? - .to_os_string() - .into_string() - .map_err(|_| BackendError::CouldNotGetFilename) -} - -/// 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_config()? - }; - - let key_paths = config.storage_paths.common_paths.keys; - - // Get key paths - let ack_key_file = key_paths.ack_key(); - - let pub_id_key_file = key_paths.public_identity_key(); - let priv_id_key_file = key_paths.private_identity_key(); - - let pub_enc_key_file = key_paths.public_encryption_key(); - let priv_enc_key_file = key_paths.private_encryption_key(); - - // Read file contents - let ack_key = fs::read_to_string(ack_key_file)?; - - let pub_id_key = fs::read_to_string(pub_id_key_file)?; - let priv_id_key = fs::read_to_string(priv_id_key_file)?; - - let pub_enc_key = fs::read_to_string(pub_enc_key_file)?; - let priv_enc_key = fs::read_to_string(priv_enc_key_file)?; - - let ack_key_file = key_filename(&key_paths.ack_key_file)?; - let pub_id_key_file = key_filename(&key_paths.public_identity_key_file)?; - let priv_id_key_file = key_filename(&key_paths.private_identity_key_file)?; - let pub_enc_key_file = key_filename(&key_paths.public_encryption_key_file)?; - let priv_enc_key_file = key_filename(&key_paths.private_encryption_key_file)?; - - // Format and return as json - let json = serde_json::json!({ - ack_key_file: ack_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/desktop/src-tauri/src/operations/growth/api_client.rs b/nym-connect/desktop/src-tauri/src/operations/growth/api_client.rs deleted file mode 100644 index c069cb6a9d..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/growth/api_client.rs +++ /dev/null @@ -1,270 +0,0 @@ -use serde::de::DeserializeOwned; -use serde::{Deserialize, Serialize}; -use thiserror::Error; - -#[allow(unused)] -#[derive(Error, Debug)] -pub enum ApiClientError { - #[error("{source}")] - Reqwest { - #[from] - source: reqwest::Error, - }, - #[error("{source}")] - SerdeJson { - #[from] - source: serde_json::Error, - }, - #[error("{0}")] - Status(String), -} - -const API_BASE_URL: &str = "https://growth-api.nymtech.net"; - -// For development mode, switch to this -// const API_BASE_URL: &str = "http://localhost:8000"; - -#[derive(Debug, Clone)] -pub struct GrowthApiClient { - base_url: String, -} - -impl GrowthApiClient { - pub fn new(resource_base: &str) -> Self { - let base_url = std::env::var("API_BASE_URL").unwrap_or_else(|_| API_BASE_URL.to_string()); - GrowthApiClient { - base_url: format!("{base_url}{resource_base}"), - } - } - - pub fn registrations() -> Registrations { - Registrations::new(GrowthApiClient::new("/v1/tne")) - } - - pub fn daily_draws() -> DailyDraws { - DailyDraws::new(GrowthApiClient::new("/v1/tne/daily_draw")) - } - - pub(crate) async fn get(&self, url: &str) -> Result { - 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(10)) - .build()?; - - match client.get(format!("{}{}", self.base_url, url)).send().await { - Ok(res) => { - if res.status().is_client_error() || res.status().is_server_error() { - log::error!("<<< {}", res.status()); - return Err(ApiClientError::Status(res.status().to_string())); - } - match res.text().await { - Ok(response_body) => { - log::info!("<<< {}", response_body); - match serde_json::from_str(&response_body) { - Ok(res) => Ok(res), - Err(e) => { - log::error!("<<< JSON parsing error: {}", e); - Err(e.into()) - } - } - } - Err(e) => { - log::error!("<<< Request error: {}", e); - Err(e.into()) - } - } - } - Err(e) => { - log::error!("<<< Response parsing error: {}", e); - Err(e.into()) - } - } - } - - // TODO: use the method in `operations::http` instead - pub(crate) async fn post( - &self, - url: &str, - body: &REQ, - ) -> Result { - log::info!(">>> POST {}", 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(10)) - .build()?; - - match client - .post(format!("{}{}", self.base_url, url)) - .json(body) - .send() - .await - { - Ok(res) => { - if res.status().is_client_error() || res.status().is_server_error() { - log::error!("<<< {}", res.status()); - return Err(ApiClientError::Status(res.status().to_string())); - } - match res.text().await { - Ok(response_body) => { - log::info!("<<< {}", response_body); - match serde_json::from_str(&response_body) { - Ok(res) => Ok(res), - Err(e) => { - log::error!("<<< JSON parsing error: {}", e); - Err(e.into()) - } - } - } - Err(e) => { - log::error!("<<< Request error: {}", e); - Err(e.into()) - } - } - } - Err(e) => { - log::error!("<<< Response parsing error: {}", e); - Err(e.into()) - } - } - } -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct ClientIdPartial { - pub client_id: String, - pub client_id_signature: String, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct Registration { - pub id: String, - pub client_id: String, - pub timestamp: String, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct Ping { - pub client_id: String, - pub timestamp: String, -} - -pub struct Registrations { - client: GrowthApiClient, -} - -impl Registrations { - pub fn new(client: GrowthApiClient) -> Self { - Registrations { client } - } - - pub async fn register( - &self, - registration: &ClientIdPartial, - ) -> Result { - self.client.post("/register", ®istration).await - } - - #[allow(dead_code)] - pub async fn unregister(&self, registration: &ClientIdPartial) -> Result<(), ApiClientError> { - self.client.post("/unregister", ®istration).await - } - - #[allow(dead_code)] - pub async fn status(&self, registration: &ClientIdPartial) -> Result<(), ApiClientError> { - self.client.post("/status", ®istration).await - } - - pub async fn ping(&self, registration: &ClientIdPartial) -> Result<(), ApiClientError> { - self.client.post("/ping", ®istration).await - } - - #[allow(dead_code)] - pub async fn health(&self) -> Result<(), ApiClientError> { - self.client.get("/health").await - } -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct DrawEntryPartial { - pub draw_id: String, - pub client_id: String, - pub client_id_signature: String, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct DrawEntry { - pub id: String, - pub draw_id: String, - pub timestamp: String, - pub status: Option, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct DrawWithWordOfTheDay { - pub id: String, - pub start_utc: String, - pub end_utc: String, - pub word_of_the_day: Option, - pub last_modified: String, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct ClaimPartial { - pub draw_id: String, - pub registration_id: String, - pub client_id: String, - pub client_id_signature: String, - pub wallet_address: String, -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct Winner { - pub id: String, - pub client_id: String, - pub draw_id: String, - pub timestamp: String, - pub winner_reg_id: String, - pub winner_wallet_address: Option, - pub winner_claim_timestamp: Option, -} - -pub struct DailyDraws { - client: GrowthApiClient, -} - -impl DailyDraws { - pub fn new(client: GrowthApiClient) -> Self { - DailyDraws { client } - } - - pub async fn current(&self) -> Result { - self.client.get("/current").await - } - - pub async fn next(&self) -> Result { - self.client.get("/next").await - } - - #[allow(dead_code)] - pub async fn status(&self, draw_id: &str) -> Result { - self.client.get(format!("/status/{draw_id}").as_str()).await - } - - pub async fn enter(&self, entry: &DrawEntryPartial) -> Result { - self.client.post("/enter", entry).await - } - - pub async fn entries( - &self, - client_id: &ClientIdPartial, - ) -> Result, ApiClientError> { - self.client.post("/entries", client_id).await - } - - pub async fn claim(&self, claim: &ClaimPartial) -> Result { - self.client.post("/claim", claim).await - } -} diff --git a/nym-connect/desktop/src-tauri/src/operations/growth/assets.rs b/nym-connect/desktop/src-tauri/src/operations/growth/assets.rs deleted file mode 100644 index 752b221916..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/growth/assets.rs +++ /dev/null @@ -1,57 +0,0 @@ -use rust_embed::RustEmbed; -extern crate yaml_rust; -use yaml_rust::YamlLoader; - -#[derive(RustEmbed)] -#[folder = "../src/components/Growth/content/"] -#[include = "*.yaml"] -#[exclude = "*.mdx"] -struct Asset; - -#[derive(Debug)] -pub struct NotificationContent { - pub title: String, - pub body: String, -} - -#[derive(Debug)] -pub struct Notifications { - pub you_are_in_draw: NotificationContent, - pub take_part: NotificationContent, -} - -pub struct Content {} - -const RESOURCE_ERROR: &str = "❌ RESOURCE ERROR"; - -fn get_as_string_or_error_message(value: &yaml_rust::Yaml) -> String { - value.as_str().unwrap_or(RESOURCE_ERROR).to_string() -} - -impl Content { - pub fn get_notifications() -> Notifications { - let content = Asset::get("en.yaml").unwrap(); - let s = std::str::from_utf8(content.data.as_ref()).unwrap(); - let content = YamlLoader::load_from_str(s).unwrap(); - let content = &content[0]; - - Notifications { - you_are_in_draw: NotificationContent { - title: get_as_string_or_error_message( - &content["testAndEarn"]["notifications"]["youAreInDraw"]["title"], - ), - body: get_as_string_or_error_message( - &content["testAndEarn"]["notifications"]["youAreInDraw"]["body"], - ), - }, - take_part: NotificationContent { - title: get_as_string_or_error_message( - &content["testAndEarn"]["notifications"]["takePart"]["title"], - ), - body: get_as_string_or_error_message( - &content["testAndEarn"]["notifications"]["takePart"]["body"], - ), - }, - } - } -} diff --git a/nym-connect/desktop/src-tauri/src/operations/growth/mod.rs b/nym-connect/desktop/src-tauri/src/operations/growth/mod.rs deleted file mode 100644 index 449c1bcee2..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/growth/mod.rs +++ /dev/null @@ -1,3 +0,0 @@ -pub mod api_client; -pub mod assets; -pub mod test_and_earn; diff --git a/nym-connect/desktop/src-tauri/src/operations/growth/test_and_earn.rs b/nym-connect/desktop/src-tauri/src/operations/growth/test_and_earn.rs deleted file mode 100644 index c2216ce245..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/growth/test_and_earn.rs +++ /dev/null @@ -1,156 +0,0 @@ -use crate::error::BackendError; -use crate::operations::export::get_identity_key; -use crate::operations::growth::api_client::{ - ClaimPartial, ClientIdPartial, DrawEntry, DrawEntryPartial, DrawWithWordOfTheDay, - GrowthApiClient, Registration, Winner, -}; -use crate::State; -use serde::{Deserialize, Serialize}; -use std::sync::Arc; -use tauri::api::notification::Notification; -use tauri::Manager; -use tokio::sync::RwLock; - -async fn get_client_id( - state: &tauri::State<'_, Arc>>, -) -> Result { - let keypair = get_identity_key(state).await?; - let client_id = keypair.public_key().to_base58_string(); - let client_id_signature = keypair - .private_key() - .sign(client_id.as_bytes()) - .to_base58_string(); - Ok(ClientIdPartial { - client_id, - client_id_signature, - }) -} - -#[tauri::command] -pub async fn growth_tne_get_client_id( - state: tauri::State<'_, Arc>>, -) -> Result { - get_client_id(&state).await -} - -#[tauri::command] -pub async fn growth_tne_take_part( - app_handle: tauri::AppHandle, - state: tauri::State<'_, Arc>>, -) -> Result { - let notifications = super::assets::Content::get_notifications(); - - let client_id = get_client_id(&state).await?; - let registration = GrowthApiClient::registrations() - .register(&client_id) - .await?; - - log::info!("<<< Test&Earn: registration details: {:?}", registration); - - if let Err(e) = Notification::new(&app_handle.config().tauri.bundle.identifier) - .title(notifications.take_part.title) - .body(notifications.take_part.body) - .show() - { - log::error!("Could not show notification. Error = {:?}", e); - } - - Ok(registration) -} - -#[derive(Debug, Clone, Deserialize, Serialize)] -pub struct Draws { - pub current: Option, - pub next: Option, - pub draws: Vec, -} - -#[tauri::command] -pub async fn growth_tne_get_draws(client_details: ClientIdPartial) -> Result { - let draws_api = GrowthApiClient::daily_draws(); - - let current = draws_api.current().await.ok(); - let next = draws_api.next().await.ok(); - let draws = draws_api.entries(&client_details).await?; - - Ok(Draws { - current, - next, - draws, - }) -} - -#[tauri::command] -pub async fn growth_tne_enter_draw( - client_details: ClientIdPartial, - draw_id: String, -) -> Result { - Ok(GrowthApiClient::daily_draws() - .enter(&DrawEntryPartial { - draw_id, - client_id: client_details.client_id, - client_id_signature: client_details.client_id_signature, - }) - .await?) -} - -#[tauri::command] -pub async fn growth_tne_submit_wallet_address( - client_details: ClientIdPartial, - draw_id: String, - wallet_address: String, - registration_id: String, -) -> Result { - Ok(GrowthApiClient::daily_draws() - .claim(&ClaimPartial { - draw_id, - client_id: client_details.client_id, - client_id_signature: client_details.client_id_signature, - wallet_address, - registration_id, - }) - .await?) -} - -#[tauri::command] -pub async fn growth_tne_ping(client_details: ClientIdPartial) -> Result<(), BackendError> { - log::info!("Test&Earn is sending a ping..."); - Ok(GrowthApiClient::registrations() - .ping(&client_details) - .await?) -} - -#[tauri::command] -pub async fn growth_tne_toggle_window( - app_handle: tauri::AppHandle, - window_title: Option, -) -> Result<(), BackendError> { - if let Some(window) = app_handle.windows().get("growth") { - log::info!("Closing growth window..."); - if let Err(e) = window.close() { - log::error!("Unable to close growth window: {:?}", e); - } - return Ok(()); - } - - log::info!("Creating growth window..."); - match tauri::WindowBuilder::new( - &app_handle, - "growth", - tauri::WindowUrl::App("growth.html".into()), - ) - .title(window_title.unwrap_or_else(|| "NymConnect Test&Earn".to_string())) - .build() - { - Ok(window) => { - if let Err(e) = window.set_focus() { - log::error!("Unable to focus growth window: {:?}", e); - } - Ok(()) - } - Err(e) => { - log::error!("Unable to create growth window: {:?}", e); - Err(BackendError::NewWindowError) - } - } -} diff --git a/nym-connect/desktop/src-tauri/src/operations/help/log.rs b/nym-connect/desktop/src-tauri/src/operations/help/log.rs deleted file mode 100644 index e2cfd249b1..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/help/log.rs +++ /dev/null @@ -1,30 +0,0 @@ -use crate::error::BackendError; -use tauri::Manager; - -#[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/desktop/src-tauri/src/operations/help/mod.rs b/nym-connect/desktop/src-tauri/src/operations/help/mod.rs deleted file mode 100644 index 52dafe6d0f..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/help/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -pub mod log; -pub mod storage; diff --git a/nym-connect/desktop/src-tauri/src/operations/help/storage.rs b/nym-connect/desktop/src-tauri/src/operations/help/storage.rs deleted file mode 100644 index e6b349cacb..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/help/storage.rs +++ /dev/null @@ -1,20 +0,0 @@ -use std::sync::Arc; - -use crate::{error::BackendError, state::State}; -use tauri::Manager; -use tokio::sync::RwLock; - -#[tauri::command] -pub fn help_clear_storage(app_handle: tauri::AppHandle) -> Result<(), BackendError> { - log::info!("Clearing user data"); - - let state = app_handle.try_state::>>(); - if let Some(s) = state { - let mut guard = s.blocking_write(); - guard.clear_user_data().ok(); - } else { - log::warn!("fail to retrieve the state, user data has not been cleared"); - } - - Ok(()) -} diff --git a/nym-connect/desktop/src-tauri/src/operations/http.rs b/nym-connect/desktop/src-tauri/src/operations/http.rs deleted file mode 100644 index 5cfe3e1f53..0000000000 --- a/nym-connect/desktop/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/desktop/src-tauri/src/operations/mod.rs b/nym-connect/desktop/src-tauri/src/operations/mod.rs deleted file mode 100644 index 977dcc5110..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/mod.rs +++ /dev/null @@ -1,9 +0,0 @@ -pub mod common; -pub mod config; -pub mod connection; -pub mod directory; -pub mod export; -pub mod growth; -pub mod help; -pub mod http; -pub mod window; diff --git a/nym-connect/desktop/src-tauri/src/operations/window/mod.rs b/nym-connect/desktop/src-tauri/src/operations/window/mod.rs deleted file mode 100644 index b89cdb88ff..0000000000 --- a/nym-connect/desktop/src-tauri/src/operations/window/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -use crate::window::window_hide; -use tauri::{AppHandle, Wry}; - -#[tauri::command] -pub fn hide_window(app: AppHandle) { - window_hide(&app); -} diff --git a/nym-connect/desktop/src-tauri/src/state.rs b/nym-connect/desktop/src-tauri/src/state.rs deleted file mode 100644 index 83350b98fe..0000000000 --- a/nym-connect/desktop/src-tauri/src/state.rs +++ /dev/null @@ -1,300 +0,0 @@ -use futures::SinkExt; -use log::error; -use nym_client_core::error::ClientCoreStatusMessage; -use nym_socks5_client_core::{Socks5ControlMessage, Socks5ControlMessageSender}; -use std::time::Duration; -use tap::TapFallible; -use tauri::Manager; -use tokio::time::Instant; - -use crate::config::Config; -use crate::config::PrivacyLevel; -use crate::config::SelectedGateway; -use crate::config::SelectedSp; -use crate::config::UserData; -use crate::{ - config::{self, socks5_config_id_appended_with}, - 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 sending). 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, Debug)] -pub enum GatewayConnectivity { - 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(Debug)] -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, - - /// User data saved on disk, like user settings - user_data: UserData, -} - -impl State { - pub fn new(user_data: UserData) -> Self { - State { - status: ConnectionStatusKind::Disconnected, - service_provider: None, - gateway: None, - socks5_client_sender: None, - gateway_connectivity: GatewayConnectivity::Good, - connectivity_test_result: ConnectivityTestResult::NotAvailable, - user_data, - } - } - - 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 get_user_data(&self) -> &UserData { - &self.user_data - } - - pub fn clear_user_data(&mut self) -> Result<()> { - self.user_data.clear().map_err(|e| { - error!("Failed to clear user data {e}"); - BackendError::UserDataWriteError - }) - } - - pub fn set_monitoring(&mut self, enabled: bool) -> Result<()> { - self.user_data.monitoring = Some(enabled); - self.user_data.write().map_err(|e| { - error!("Failed to write user data to disk {e}"); - BackendError::UserDataWriteError - }) - } - - pub fn set_privacy_level(&mut self, privacy_level: PrivacyLevel) -> Result<()> { - self.user_data.privacy_level = Some(privacy_level); - self.user_data.write().map_err(|e| { - error!("Failed to write user data to disk {e}"); - BackendError::UserDataWriteError - }) - } - - pub fn set_user_selected_gateway(&mut self, gateway: Option) -> Result<()> { - self.user_data.selected_gateway = gateway; - self.user_data.write().map_err(|e| { - error!("Failed to write user data to disk {e}"); - BackendError::UserDataWriteError - }) - } - - pub fn set_user_selected_sp(&mut self, service_provider: Option) -> Result<()> { - self.user_data.selected_sp = service_provider; - self.user_data.write().map_err(|e| { - error!("Failed to write user data to disk {e}"); - BackendError::UserDataWriteError - }) - } - - 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 { - let gateway_id = self - .get_gateway() - .as_ref() - .ok_or(BackendError::CouldNotGetIdWithoutGateway)?; - Ok(socks5_config_id_appended_with(gateway_id)) - } - - pub fn load_config(&self) -> Result { - let id = self.get_config_id()?; - let config = Config::read_from_default_path(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); - - // Setup configuration by writing to file - if let Err(err) = self.init_config().await { - log::error!("Failed to initialize: {err}"); - - // 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(err); - } - - // Kick off the main task and get the channel for controlling it - self.start_nym_socks5_client().await - } - - /// Create a configuration file - async fn init_config(&self) -> Result<()> { - 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 - async fn start_nym_socks5_client( - &mut self, - ) -> Result<(nym_task::StatusReceiver, ExitStatusReceiver)> { - let id = self.get_config_id()?; - let privacy_level = self.user_data.privacy_level.unwrap_or_default(); - let (control_tx, msg_rx, exit_status_rx, used_gateway) = - tasks::start_nym_socks5_client(&id, &privacy_level).await?; - self.socks5_client_sender = Some(control_tx); - self.gateway = Some(used_gateway.gateway_id().to_base58_string()); - 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/desktop/src-tauri/src/tasks.rs b/nym-connect/desktop/src-tauri/src/tasks.rs deleted file mode 100644 index d2f2e1c3a7..0000000000 --- a/nym-connect/desktop/src-tauri/src/tasks.rs +++ /dev/null @@ -1,256 +0,0 @@ -use futures::{channel::mpsc, StreamExt}; -use nym_client_core::client::base_client::storage::gateways_storage::{ - GatewayDetails, GatewaysDetailsStore, -}; -use nym_client_core::{ - client::base_client::storage::{MixnetClientStorage, OnDiskPersistent}, - config::{GroupBy, TopologyStructure}, - error::ClientCoreStatusMessage, -}; -use nym_socks5_client_core::{NymClient as Socks5NymClient, Socks5ControlMessageSender}; -use nym_sphinx::params::PacketSize; -use nym_task::manager::TaskStatus; -use std::sync::Arc; -use tap::TapFallible; -use tokio::sync::RwLock; - -use crate::{ - config::{Config, PrivacyLevel}, - 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), -} - -fn override_config_from_env(config: &mut Config, privacy_level: &PrivacyLevel) { - // Disable both the loop cover traffic that runs in the background as well as the Poisson - // process that injects cover traffic into the traffic stream. - if let PrivacyLevel::Medium = privacy_level { - log::info!("Running in Medium privacy level"); - log::warn!("Disabling cover traffic"); - config.core.base.set_no_cover_traffic_with_keepalive(); - - log::warn!("Enabling mixed size packets"); - config - .core - .base - .set_secondary_packet_size(Some(PacketSize::ExtendedPacket16)); - - log::warn!("Disabling per-hop delay"); - config.core.base.set_no_per_hop_delays(); - - // TODO: selectable in the UI - let address = config - .core - .socks5 - .provider_mix_address - .parse() - .expect("failed to parse provider mix address"); - log::warn!("Using geo-aware mixnode selection based on the location of: {address}"); - config - .core - .base - .set_topology_structure(TopologyStructure::GeoAware(GroupBy::NymAddress(address))); - } -} - -/// The main SOCKS5 client task. It loads the configuration from file determined by the `id`. -pub async fn start_nym_socks5_client( - id: &str, - privacy_level: &PrivacyLevel, -) -> Result<( - Socks5ControlMessageSender, - nym_task::StatusReceiver, - ExitStatusReceiver, - GatewayDetails, -)> { - log::info!("Loading config from file: {id}"); - let mut config = Config::read_from_default_path(id) - .tap_err(|_| log::warn!("Failed to load configuration file"))?; - - override_config_from_env(&mut config, privacy_level); - - log::trace!("Configuration used: {:#?}", config); - - let storage = - OnDiskPersistent::from_paths(config.storage_paths.common_paths, &config.core.base.debug) - .await?; - - let used_gateway = storage - .gateway_details_store() - .active_gateway() - .await - .expect("failed to load active gateway details") - .registration - .expect("no active gateway set") - .details; - - 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 { - let socks5_client = Socks5NymClient::new(config.core, storage, None); - - 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/desktop/src-tauri/src/window.rs b/nym-connect/desktop/src-tauri/src/window.rs deleted file mode 100644 index 84cb3e41cd..0000000000 --- a/nym-connect/desktop/src-tauri/src/window.rs +++ /dev/null @@ -1,30 +0,0 @@ -use crate::menu::TRAY_MENU_SHOW_HIDE; -use tauri::{AppHandle, Manager}; - -pub(crate) fn window_hide(app: &AppHandle) { - let window = app.get_window("main").unwrap(); - let item_handle = app.tray_handle().get_item(TRAY_MENU_SHOW_HIDE); - if window.is_visible().unwrap() { - window.hide().unwrap(); - item_handle.set_title("Show").unwrap(); - } -} - -pub(crate) fn window_show(app: &AppHandle) { - let window = app.get_window("main").unwrap(); - let item_handle = app.tray_handle().get_item(TRAY_MENU_SHOW_HIDE); - if !window.is_visible().unwrap() { - window.show().unwrap(); - item_handle.set_title("Hide").unwrap(); - window.set_focus().unwrap(); - } -} - -pub(crate) fn window_toggle(app: &AppHandle) { - let window = app.get_window("main").unwrap(); - if window.is_visible().unwrap() { - window_hide(app); - } else { - window_show(app); - } -} diff --git a/nym-connect/desktop/src-tauri/tauri.conf.json b/nym-connect/desktop/src-tauri/tauri.conf.json deleted file mode 100644 index 323b734069..0000000000 --- a/nym-connect/desktop/src-tauri/tauri.conf.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "package": { - "productName": "nym-connect", - "version": "1.1.21" - }, - "build": { - "distDir": "../dist", - "devPath": "http://localhost:9000", - "beforeDevCommand": "", - "beforeBuildCommand": "" - }, - "tauri": { - "macOSPrivateApi": true, - "systemTray": { - "iconPath": "icons/tray_icon.png", - "iconAsTemplate": true - }, - "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": "Developer ID Application: Nym Technologies SA (VW5DZLFHM5)", - "entitlements": null - }, - "windows": { - "certificateThumbprint": "6DB77B1F529A0804FE0E6843A3EB8A8CECFFD408", - "digestAlgorithm": "sha256", - "timestampUrl": "http://timestamp.comodoca.com" - } - }, - "updater": { - "active": true, - "endpoints": [ - "https://nymtech.net/.wellknown/connect/updater.json" - ], - "dialog": true, - "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IENCNzQ2M0E5N0VFODE2NApSV1JrZ2U2WE9rYTNETTg1OTBKdE5uWUEra0hML2syOVUvQ2lxZmFZRzZ1T3NWbGM0eVRzUTVhVwo=" - }, - "allowlist": { - "shell": { - "open": true - }, - "clipboard": { - "writeText": true - }, - "window": { - "startDragging": true, - "close": true, - "minimize": true - }, - "notification": { - "all": true - } - }, - "windows": [ - { - "title": "NymConnect", - "width": 240, - "height": 480, - "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'" - } - } -} \ No newline at end of file diff --git a/nym-connect/desktop/src/assets/help-step-four.png b/nym-connect/desktop/src/assets/help-step-four.png deleted file mode 100644 index 5507962892..0000000000 Binary files a/nym-connect/desktop/src/assets/help-step-four.png and /dev/null differ diff --git a/nym-connect/desktop/src/assets/help-step-one-legacy.png b/nym-connect/desktop/src/assets/help-step-one-legacy.png deleted file mode 100644 index 5e91a29cff..0000000000 Binary files a/nym-connect/desktop/src/assets/help-step-one-legacy.png and /dev/null differ diff --git a/nym-connect/desktop/src/assets/help-step-one.png b/nym-connect/desktop/src/assets/help-step-one.png deleted file mode 100644 index 482e752286..0000000000 Binary files a/nym-connect/desktop/src/assets/help-step-one.png and /dev/null differ diff --git a/nym-connect/desktop/src/assets/help-step-three.png b/nym-connect/desktop/src/assets/help-step-three.png deleted file mode 100644 index 932b6c1171..0000000000 Binary files a/nym-connect/desktop/src/assets/help-step-three.png and /dev/null differ diff --git a/nym-connect/desktop/src/assets/help-step-two-legacy.png b/nym-connect/desktop/src/assets/help-step-two-legacy.png deleted file mode 100644 index f2910c98cf..0000000000 Binary files a/nym-connect/desktop/src/assets/help-step-two-legacy.png and /dev/null differ diff --git a/nym-connect/desktop/src/assets/help-step-two.png b/nym-connect/desktop/src/assets/help-step-two.png deleted file mode 100644 index c6f4429d74..0000000000 Binary files a/nym-connect/desktop/src/assets/help-step-two.png and /dev/null differ diff --git a/nym-connect/desktop/src/components/AppVersion.tsx b/nym-connect/desktop/src/components/AppVersion.tsx deleted file mode 100644 index 4ced230efa..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/AppWindowFrame.tsx b/nym-connect/desktop/src/components/AppWindowFrame.tsx deleted file mode 100644 index ca49204e11..0000000000 --- a/nym-connect/desktop/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?.address) { - 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/desktop/src/components/ConnectionButton.tsx b/nym-connect/desktop/src/components/ConnectionButton.tsx deleted file mode 100644 index 1dd72f78df..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/ConnectionStats.tsx b/nym-connect/desktop/src/components/ConnectionStats.tsx deleted file mode 100644 index f17833e66d..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/ConnectionStatus.tsx b/nym-connect/desktop/src/components/ConnectionStatus.tsx deleted file mode 100644 index 1a09c8b18e..0000000000 --- a/nym-connect/desktop/src/components/ConnectionStatus.tsx +++ /dev/null @@ -1,117 +0,0 @@ -import React from 'react'; -import { Box, CircularProgress, Stack, Tooltip, Typography } from '@mui/material'; -import { DateTime } from 'luxon'; -import { ErrorOutline, InfoOutlined } from '@mui/icons-material'; -import { ConnectionStatusKind, GatewayPerformance } from '../types'; -import { ServiceProvider, Gateway } from '../types/directory'; -import { GatwayWarningInfo, ServiceProviderInfo } from './TooltipInfo'; -import { useClientContext } from '../context/main'; - -const FONT_SIZE = '14px'; -const FONT_WEIGHT = '600'; -const FONT_STYLE = 'normal'; - -const ConnectionStatusContent: FCWithChildren<{ - status: ConnectionStatusKind; - serviceProvider?: ServiceProvider; - gateway?: Gateway; - gatewayError: boolean; -}> = ({ status, serviceProvider, gateway, gatewayError }) => { - const { userData } = useClientContext(); - - if (gatewayError) { - return ( - : undefined}> - - - - Gateway has issues - - - - ); - } - switch (status) { - case 'connected': - return ( - <> - - ) : undefined - } - > - - - - Connected to Nym Mixnet - - - - {userData?.privacy_level === 'Medium' && ( - - - Speed boost activated - - - )} - - ); - 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; - gateway?: Gateway; -}> = ({ status, serviceProvider, gateway, gatewayPerformance }) => { - const color = status === 'connected' || status === 'disconnecting' ? '#21D072' : 'white'; - - return ( - - - - ); -}; diff --git a/nym-connect/desktop/src/components/ConntectionTimer.tsx b/nym-connect/desktop/src/components/ConntectionTimer.tsx deleted file mode 100644 index 25e2af8d9c..0000000000 --- a/nym-connect/desktop/src/components/ConntectionTimer.tsx +++ /dev/null @@ -1,26 +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/desktop/src/components/CopyToClipboard.tsx b/nym-connect/desktop/src/components/CopyToClipboard.tsx deleted file mode 100644 index 7a48662190..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/CustomTitleBar.tsx b/nym-connect/desktop/src/components/CustomTitleBar.tsx deleted file mode 100644 index 5baa05c5b0..0000000000 --- a/nym-connect/desktop/src/components/CustomTitleBar.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import React from 'react'; -import { ArrowBack, Close, Menu, Minimize } 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 { appWindow } from '@tauri-apps/api/window'; -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)} - - appWindow.minimize()} /> - appWindow.close()} /> - - -); diff --git a/nym-connect/desktop/src/components/Error.tsx b/nym-connect/desktop/src/components/Error.tsx deleted file mode 100644 index f582536b6b..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/ErrorFallback.tsx b/nym-connect/desktop/src/components/ErrorFallback.tsx deleted file mode 100644 index f582536b6b..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/ExperimentalWarning.tsx b/nym-connect/desktop/src/components/ExperimentalWarning.tsx deleted file mode 100644 index 122f741d0b..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/Growth/TestAndEarnButtonArea.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnButtonArea.tsx deleted file mode 100644 index 5bf8958c3f..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnButtonArea.tsx +++ /dev/null @@ -1,83 +0,0 @@ -import React from 'react'; -import { Badge, Box, Button, Tooltip } from '@mui/material'; -import MonetizationOnIcon from '@mui/icons-material/MonetizationOn'; -import { invoke } from '@tauri-apps/api'; -import Content from './content/en.yaml'; -import { useClientContext } from '../../context/main'; -import { useTestAndEarnContext } from './context/TestAndEarnContext'; -import { NymShipyardTheme } from '../../theme'; - -export const Wrapper: FCWithChildren<{ disabled: boolean }> = ({ disabled, children }) => { - if (disabled) { - return ( - - -
{children}
-
-
- ); - } - // eslint-disable-next-line react/jsx-no-useless-fragment - return <>{children}; -}; - -export const TestAndEarnButtonArea: FCWithChildren = () => { - const clientContext = useClientContext(); - const context = useTestAndEarnContext(); - const disabled = clientContext.connectionStatus !== 'connected'; - const pinger = React.useRef(); - - const doPing = async () => { - if (context.clientDetails) { - try { - await invoke('growth_tne_ping', { clientDetails: context.clientDetails }); - } catch (_e) { - // console.error('Failed to ping: ', e); - } - } - }; - - React.useEffect(() => { - (async () => { - if (!disabled) { - // sleep a little until the SOCKS5 proxy connects - setTimeout(() => { - doPing(); - }, 1000 * 10); - - // update every 15 mins - pinger.current = setInterval(doPing, 1000 * 60 * 15); - } else if (pinger.current) { - clearInterval(pinger.current); - pinger.current = null; - } - })(); - }, [disabled, context.clientDetails]); - - const handleClick = async () => { - if (!disabled) { - await context.toggleGrowthWindow(Content.testAndEarn.popupWindow.title); - } - }; - - return ( - - - - - - - - ); -}; diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnCurrentDraw.stories.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnCurrentDraw.stories.tsx deleted file mode 100644 index 99b9206e7a..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnCurrentDraw.stories.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import * as React from 'react'; -import { ComponentMeta } from '@storybook/react'; -import { DateTime, Duration } from 'luxon'; -import { - TestAndEarnCurrentDraw, - TestAndEarnCurrentDrawEntered, - TestAndEarnCurrentDrawFuture, -} from './TestAndEarnCurrentDraw'; -import { NymShipyardTheme } from '../../theme'; -import { DrawEntryStatus } from './context/types'; -import { testMarkdown } from './context/mocks/TestAndEarnContext'; - -export default { - title: 'Growth/TestAndEarn/Components/Cards/Current Draw', - component: TestAndEarnCurrentDraw, -} as ComponentMeta; - -export const Valid = () => ( - - - -); - -export const EnteredMalformedDraw = () => ( - - - -); - -export const EnteredDraw = () => ( - - - -); - -export const Future = () => ( - - - -); diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnCurrentDraw.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnCurrentDraw.tsx deleted file mode 100644 index b1b2bb951a..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnCurrentDraw.tsx +++ /dev/null @@ -1,192 +0,0 @@ -import React from 'react'; -import LoadingButton from '@mui/lab/LoadingButton'; -import { Alert, AlertTitle, Box, Card, CardContent, CardMedia, Link, Typography } from '@mui/material'; -import { SxProps } from '@mui/system'; -import { DateTime } from 'luxon'; -import ReactMarkdown from 'react-markdown'; -import assetAnimation from './content/assets/matrix.webp'; -import { CopyToClipboard } from '../CopyToClipboard'; -import { useTestAndEarnContext } from './context/TestAndEarnContext'; -import { DrawEntryStatus, DrawWithWordOfTheDay } from './context/types'; -import Content from './content/en.yaml'; - -export const TestAndEarnCurrentDrawFuture: FCWithChildren<{ draw?: DrawWithWordOfTheDay }> = ({ draw }) => { - const startsUtc = React.useMemo(() => draw && DateTime.fromISO(draw.start_utc), [draw?.start_utc]); - const startsIn = React.useMemo(() => { - if (draw && startsUtc) { - return startsUtc.toRelative(); - } - return undefined; - }, [draw?.start_utc]); - - if (!draw || !startsUtc) { - return null; - } - return ( - - -

- {Content.testAndEarn.draw.next.header} {startsIn} ⏰ -

-

on {startsUtc.toLocaleString(DateTime.DATETIME_FULL)}

-
-
- ); -}; - -export const TestAndEarnCurrentDrawEnter: FCWithChildren<{ draw?: DrawWithWordOfTheDay }> = ({ draw }) => { - const context = useTestAndEarnContext(); - const [busy, setBusy] = React.useState(false); - const [error, setError] = React.useState(); - const handleClick = async () => { - if (!draw) { - setError('No draw selected'); - return; - } - - setBusy(true); - try { - await context.enterDraw(draw.id); - } catch (e) { - const message = `${e}`; - console.error('Could not enter draw', message); - setError(message); - } - setBusy(false); - }; - return ( - - Complete today’s task for the chance to earn 1000 NYMs. - - Start task ✨ - - {error && ( - - - Oh no! Something went wrong. - {error} - - - )} - - ); -}; - -export const TestAndEarnCurrentDrawEntered: FCWithChildren<{ draw?: DrawWithWordOfTheDay }> = ({ draw }) => { - if (!draw || !draw.entry) { - return null; - } - - if (!draw.word_of_the_day) { - return ( - - Oh no! Something is wrong - Someone configured the wrong instructions for the task, you will not be able to see it until this is fixed - - ); - } - - return ( - - - {draw.word_of_the_day} - - - {Content.testAndEarn.task.afterText} - - {draw.entry.id} - - - {Content.testAndEarn.task.beforeSocials} - - - Twitter - {' '} - - remember to - - @nymproject - {' '} - and use the hashtag{' '} - - #PrivacyLovesCompany - - - or - - Nym{' '} - - Telegram channel - - - - ); -}; - -export const TestAndEarnCurrentDraw: FCWithChildren<{ - draw?: DrawWithWordOfTheDay; - sx?: SxProps; -}> = ({ draw, sx }) => { - const [trigger, setTrigger] = React.useState(DateTime.now().toISO()); - const endsUtc = React.useMemo(() => draw && DateTime.fromISO(draw.end_utc), [draw?.end_utc]); - const closesIn = React.useMemo(() => { - if (draw && endsUtc) { - return endsUtc.toRelative(); - } - return undefined; - }, [trigger, endsUtc]); - - React.useEffect(() => { - const timer = setInterval(() => setTrigger(DateTime.now().toISO()), 1000 * 3600 * 15); - return () => clearInterval(timer); - }, []); - - if (draw && closesIn && endsUtc) { - return ( - - -

- {"Today's task ends "} - {closesIn} - - {endsUtc.weekdayLong} {endsUtc.toLocaleString(DateTime.DATETIME_FULL)} - -

- {!draw.entry && } - {draw.entry && } -
- -
- ); - } - - return null; -}; - -export const TestAndEarnCurrentDrawWithState: FCWithChildren<{ - sx?: SxProps; -}> = ({ sx }) => { - const context = useTestAndEarnContext(); - - if ( - context.draws?.current?.entry?.status === DrawEntryStatus.winner || - context.draws?.current?.entry?.status === DrawEntryStatus.claimed || - context.draws?.current?.entry?.status === DrawEntryStatus.noWin - ) { - return null; - } - - if (!context.draws?.current) { - return ; - } - - return ; -}; diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnDraws.stories.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnDraws.stories.tsx deleted file mode 100644 index c70f223420..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnDraws.stories.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable react/jsx-pascal-case */ -import * as React from 'react'; -import { ComponentMeta } from '@storybook/react'; -import { NymShipyardTheme } from 'src/theme'; -import { TestAndEarnDraws } from './TestAndEarnDraws'; -import { MockTestAndEarnProvider_RegisteredWithAllDraws } from './context/mocks/TestAndEarnContext'; - -export default { - title: 'Growth/TestAndEarn/Components/Cards/Draws', - component: TestAndEarnDraws, -} as ComponentMeta; - -export const Draws = () => ( - - - - - -); diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnDraws.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnDraws.tsx deleted file mode 100644 index 24d97b7439..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnDraws.tsx +++ /dev/null @@ -1,196 +0,0 @@ -/* eslint-disable react/jsx-no-useless-fragment */ -import React from 'react'; -import LoadingButton from '@mui/lab/LoadingButton'; -import { - Alert, - AlertTitle, - Button, - Card, - CardContent, - Chip, - Dialog, - Table, - TableBody, - TableCell, - TableContainer, - TableRow, - Tooltip, - Typography, -} from '@mui/material'; -import { SxProps } from '@mui/system'; -import { DateTime } from 'luxon'; -import { useTestAndEarnContext } from './context/TestAndEarnContext'; -import { DrawEntry, DrawEntryStatus } from './context/types'; -import { CopyToClipboard } from '../CopyToClipboard'; -import { TestAndEarnEnterWalletAddress } from './TestAndEarnEnterWalletAddress'; -import Content from './content/en.yaml'; - -const statusToText = (status: string): string => Content.testAndEarn.status.chip[status] || '-'; - -const statusToColor = (status: string): 'info' | 'success' | 'warning' | undefined => { - switch (status) { - case DrawEntryStatus.pending: - return 'info'; - case DrawEntryStatus.winner: - return 'warning'; - case DrawEntryStatus.claimed: - return 'success'; - default: - return undefined; - } -}; - -const StatusText: FCWithChildren<{ entry: DrawEntry }> = ({ entry }) => { - const context = useTestAndEarnContext(); - const [busy, setBusy] = React.useState(false); - const [error, setError] = React.useState(); - const [showWalletCapture, setShowWalletCapture] = React.useState(false); - - const clear = () => { - setShowWalletCapture(false); - setError(undefined); - setBusy(false); - }; - - const handleStartWalletCapture = async () => { - setBusy(true); - setShowWalletCapture(true); - }; - - const cancelEndWalletCapture = async () => { - setBusy(false); - setShowWalletCapture(false); - }; - - const handleEndWalletCapture = async () => { - setBusy(true); - setShowWalletCapture(false); - - if (!context.walletAddress) { - setError('Wallet address is not set'); - return; - } - if (!entry.draw_id) { - setError('Task id is not set'); - return; - } - - try { - await context.claim(entry.draw_id, context.walletAddress); - } catch (e) { - const message = `${e}`; - console.error('Failed to submit claim'); - setError(message); - } - setBusy(false); - }; - - if (error) { - return ( - - Oh no! Failed to submit claim - {error} - - - ); - } - - if (showWalletCapture) { - return ( - - - - ); - } - - switch (entry.status) { - case DrawEntryStatus.pending: - return <>{Content.testAndEarn.status.text.Pending}; - case DrawEntryStatus.winner: - return ( - <> - {Content.testAndEarn.status.text.Winner} - - {Content.testAndEarn.winner.claimButton.text} - - - ); - case DrawEntryStatus.claimed: - return <>{Content.testAndEarn.status.text.Claimed}; - case DrawEntryStatus.noWin: - return <>{Content.testAndEarn.status.text.NoWin}; - default: - return null; - } -}; - -export const TestAndEarnDraws: FCWithChildren<{ - sx?: SxProps; -}> = () => { - const context = useTestAndEarnContext(); - - const draws = React.useMemo( - () => - (context.draws?.draws || []).map((item) => ({ - ...item, - timestamp: DateTime.fromISO(item.timestamp).toLocaleString(DateTime.DATETIME_FULL), - })), - [context.draws?.draws], - ); - - if (!context.draws) { - return null; - } - - return ( - - - Here is a history of the tasks you have completed: - - - - {draws.map((entry) => ( - - {entry.timestamp} - - - - - - - - - - {entry.id} - - - ))} - -
-
-
-
- ); -}; - -export const TestAndEarnDrawsWithState: FCWithChildren<{ - sx?: SxProps; -}> = ({ sx }) => { - const context = useTestAndEarnContext(); - - const drawCount = context.draws?.draws?.length || 0; - if (drawCount < 1) { - return null; - } - - return ; -}; diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnEnterWalletAddress.stories.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnEnterWalletAddress.stories.tsx deleted file mode 100644 index 0f5c4ea0de..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnEnterWalletAddress.stories.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import * as React from 'react'; -import { ComponentMeta } from '@storybook/react'; -import { Box } from '@mui/material'; -import { TestAndEarnEnterWalletAddress } from './TestAndEarnEnterWalletAddress'; -import { TestAndEarnContextProvider } from './context/TestAndEarnContext'; -import { NymShipyardTheme } from '../../theme'; - -export default { - title: 'Growth/TestAndEarn/Components/Enter wallet address', - component: TestAndEarnEnterWalletAddress, -} as ComponentMeta; - -export const Empty = () => ( - - - - - - - -); - -export const ErrorValue = () => ( - - - - - - - -); - -export const ValidValue = () => ( - - - - - - - -); diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnEnterWalletAddress.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnEnterWalletAddress.tsx deleted file mode 100644 index 60aea1d51b..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnEnterWalletAddress.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import React from 'react'; -import { WalletAddressFormField } from '@nymproject/react/account/WalletAddressFormField'; -import { SxProps } from '@mui/system'; -import { Box, Button, Paper, Stack } from '@mui/material'; -import ArrowCircleRightIcon from '@mui/icons-material/ArrowCircleRight'; -import { useTestAndEarnContext } from './context/TestAndEarnContext'; - -export const TestAndEarnEnterWalletAddress: FCWithChildren<{ - initialValue?: string; - placeholder?: string; - onSubmit?: () => Promise | void; - sx?: SxProps; -}> = ({ initialValue, placeholder, onSubmit }) => { - const context = useTestAndEarnContext(); - const [isAddressValid, setAddressIsValid] = React.useState(false); - return ( - - - - - - - - - - - ); -}; diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnError.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnError.tsx deleted file mode 100644 index 1ad4f94cc8..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnError.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import { Box, Button } from '@mui/material'; - -export const TestAndEarnError: FCWithChildren<{ error?: string }> = ({ error = 'An error has occurred' }) => ( - - - {error} - - - -); diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnPopup.stories.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnPopup.stories.tsx deleted file mode 100644 index 7e000ca093..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnPopup.stories.tsx +++ /dev/null @@ -1,162 +0,0 @@ -/* eslint-disable react/jsx-pascal-case */ -import * as React from 'react'; -import { ComponentMeta } from '@storybook/react'; -import { Alert, Box } from '@mui/material'; -import { NymShipyardTheme } from 'src/theme'; -import { TestAndEarnPopup, TestAndEarnPopupContent } from './TestAndEarnPopup'; -import { TestAndEarnContextProvider } from './context/TestAndEarnContext'; -import { MockProvider } from '../../context/mocks/main'; -import { ConnectionStatusKind } from '../../types'; -import { - MockTestAndEarnProvider_NotRegistered, - MockTestAndEarnProvider_RegisteredAndError, - MockTestAndEarnProvider_RegisteredWithDraws, - MockTestAndEarnProvider_RegisteredWithDrawsAndEntry, - MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndNoWinner, - MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndWinner, - MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndWinnerClaimed, - MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndWinnerCollectWallet, - MockTestAndEarnProvider_RegisteredWithDrawsNoCurrent, -} from './context/mocks/TestAndEarnContext'; - -export default { - title: 'Growth/TestAndEarn/Content/Popup', - component: TestAndEarnPopupContent, -} as ComponentMeta; - -const MacOSWindow: FCWithChildren<{ - width?: string | number; - height?: string | number; - title?: string; - children: React.ReactNode; -}> = ({ title, width, height, children }) => ( - - - - - - - - - - - - - - - - - - - {title || 'Window title'} - - - {children} - -); - -const Wrapper: FCWithChildren<{ text: React.ReactNode }> = ({ text }) => ( - - - {text} - - - - - -); - -export const Stage0 = () => ( - - - - - -); - -export const Stage1EnterDraw = () => ( - - - - - -); - -export const Stage2GetTask = () => ( - - - - - -); - -export const Stage3Winner = () => ( - - - - - -); - -export const Stage3NoPrize = () => ( - - - - - -); - -export const Stage4EnterWalletAddress = () => ( - - - - - -); - -export const Stage5ClaimedPrize = () => ( - - - - - -); - -export const Stage6DrawsFinished = () => ( - - - - - -); - -export const Connecting = () => ( - - - - - -); - -export const Disconnected = () => ( - - - - - -); - -export const Error = () => ( - - - - - -); diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnPopup.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnPopup.tsx deleted file mode 100644 index 2535f2ef6f..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnPopup.tsx +++ /dev/null @@ -1,118 +0,0 @@ -import React from 'react'; -import { Box, CircularProgress, LinearProgress, Stack, Typography } from '@mui/material'; -import { useClientContext } from '../../context/main'; -import ErrorContent from './content/TestAndEarn/Error.mdx'; -import ContentStep0 from './content/TestAndEarn/Stage0_intro.mdx'; -import ContentNotAvailable from './content/TestAndEarnNotAvaialble.mdx'; -import { ConnectionStatusKind } from '../../types'; -import { useTestAndEarnContext } from './context/TestAndEarnContext'; -import { TestAndEarnWinnerWithState } from './TestAndEarnWinner'; -import { TestAndEarnCurrentDrawWithState } from './TestAndEarnCurrentDraw'; -import { TestAndEarnDrawsWithState } from './TestAndEarnDraws'; - -enum Stages { - mustRegister = 'mustRegister', - registered = 'registered', -} - -export const TestAndEarnPopupContent: FCWithChildren<{ - stage?: string; - connectionStatus?: ConnectionStatusKind; - error?: string; -}> = ({ connectionStatus, error, stage = Stages.mustRegister }) => { - if (error) { - return ( - - - - ); - } - - if (!connectionStatus || connectionStatus === 'disconnected') { - return ( - - - - ); - } - - if (connectionStatus === 'connecting' || connectionStatus === 'disconnecting') { - return ( - - - Please wait... - - ); - } - - switch (stage) { - case Stages.mustRegister: - return ( - - - - ); - case Stages.registered: - return ( - - - - - - ); - default: - return ( - - - - Waiting for task information... - - - ); - } -}; - -export const TestAndEarnPopup: FCWithChildren = () => { - const clientContext = useClientContext(); - const context = useTestAndEarnContext(); - - React.useEffect(() => { - if (clientContext.connectionStatus === 'connected') { - context.refresh(); - } - }, [clientContext.connectionStatus]); - - const stage = React.useMemo(() => { - if (context.registration) { - return Stages.registered; - } - return Stages.mustRegister; - }, [context.registration?.id]); - - React.useEffect(() => { - const interval = setInterval(context.refresh, 1000 * 60 * 5); - return () => clearInterval(interval); - }, []); - - if (!context.loadedOnce && clientContext.connectionStatus === 'connected') { - const message = 'Waiting for data to be transferred over the mixnet...'; - return ( - - - - {message} - {/* {process.env.NODE_ENV === 'development' &&
{JSON.stringify(context, null, 2)}
} */} -
-
- ); - } - - return ( - <> - {context.loading && } - {/* */} - - {/* {process.env.NODE_ENV === 'development' &&
{JSON.stringify(context, null, 2)}
} */} - - ); -}; diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnTakePart.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnTakePart.tsx deleted file mode 100644 index b8a096acf6..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnTakePart.tsx +++ /dev/null @@ -1,75 +0,0 @@ -import React from 'react'; -import { Alert, AlertTitle, Box, Checkbox, Link, Stack } from '@mui/material'; -import LoadingButton from '@mui/lab/LoadingButton'; -import { SxProps } from '@mui/system'; -import ArrowCircleRightIcon from '@mui/icons-material/ArrowCircleRight'; -import { invoke } from '@tauri-apps/api'; -import { useTestAndEarnContext } from './context/TestAndEarnContext'; -import { Registration } from './context/types'; - -export const TestAndEarnTakePart: FCWithChildren<{ - websiteLinkUrl: string; - websiteLinkText: string; - content: string; - sx?: SxProps; -}> = ({ content, websiteLinkText, websiteLinkUrl, sx }) => { - const [agree, setAgree] = React.useState(false); - const [busy, setBusy] = React.useState(false); - const [error, setError] = React.useState(); - const context = useTestAndEarnContext(); - const handleNext = async () => { - try { - setBusy(true); - if (context.clientDetails) { - const registration: Registration = await invoke('growth_tne_take_part'); - console.log('Registration: ', { registration }); - await context.setAndStoreRegistration(registration); - if (registration) { - console.log('Registered...'); - } else { - setError('Failed to get registration details'); - } - } else { - setError('Failed to get client details'); - } - } catch (e) { - const message = `${e}`; - console.error('An error occurred', message); - setError(message); - setBusy(false); // the busy state only resets on errors, for success stats, the context will navigate the window away - } - }; - return ( - <> - - - setAgree(checked)} /> - - {content} - - - - - {websiteLinkText} - - - } - onClick={handleNext} - > - Next - - - {error && ( - - Oh no! Something went wrong - {error} - - )} - - ); -}; diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnWinner.stories.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnWinner.stories.tsx deleted file mode 100644 index 03ed77aa53..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnWinner.stories.tsx +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable react/jsx-pascal-case */ -import * as React from 'react'; -import { ComponentMeta } from '@storybook/react'; -import { NymShipyardTheme } from 'src/theme'; -import { TestAndEarnWinner, TestAndEarnWinnerWithState } from './TestAndEarnWinner'; -import { MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndWinner } from './context/mocks/TestAndEarnContext'; - -export default { - title: 'Growth/TestAndEarn/Components/Cards/Winner', - component: TestAndEarnWinner, -} as ComponentMeta; - -export const Winner = () => ( - - - - - -); diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnWinner.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnWinner.tsx deleted file mode 100644 index 41db329a2a..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnWinner.tsx +++ /dev/null @@ -1,114 +0,0 @@ -import React from 'react'; -import { Alert, AlertTitle, Button, Card, CardContent, CardMedia, Dialog, Typography } from '@mui/material'; -import { SxProps } from '@mui/system'; -import LoadingButton from '@mui/lab/LoadingButton'; -import winner from './content/assets/winner.webp'; -import { useTestAndEarnContext } from './context/TestAndEarnContext'; -import { DrawEntry, DrawEntryStatus } from './context/types'; -import { TestAndEarnEnterWalletAddress } from './TestAndEarnEnterWalletAddress'; -import Content from './content/en.yaml'; - -export const TestAndEarnWinner: FCWithChildren<{ - sx?: SxProps; - entry?: DrawEntry; -}> = ({ entry }) => { - const context = useTestAndEarnContext(); - const [busy, setBusy] = React.useState(false); - const [error, setError] = React.useState(); - const [showWalletCapture, setShowWalletCapture] = React.useState(false); - - const clear = () => { - setShowWalletCapture(false); - setError(undefined); - setBusy(false); - }; - - const handleStartWalletCapture = async () => { - setBusy(true); - setShowWalletCapture(true); - }; - - const cancelEndWalletCapture = async () => { - setBusy(false); - setShowWalletCapture(false); - }; - - const handleEndWalletCapture = async () => { - setBusy(true); - setShowWalletCapture(false); - - if (!context.walletAddress) { - setError('Wallet address is not set'); - return; - } - if (!entry?.draw_id) { - setError('Draw id is not set'); - return; - } - - try { - await context.claim(entry.draw_id, context.walletAddress); - } catch (e) { - const message = `${e}`; - console.error('Failed to submit claim', entry.draw_id, context.walletAddress); - setError(message); - } - setBusy(false); - }; - - return ( - <> - {showWalletCapture && ( - - - - )} - - - - - {Content.testAndEarn.winner.card.header} - - - {entry && ( - <> - {Content.testAndEarn.winner.card.text} {entry.draw_id}. - - )} - - {Content.testAndEarn.winner.claimButton.text} - - - {error && ( - - Oh no! Failed to submit claim - {error} - - - )} - - - - ); -}; - -export const TestAndEarnWinnerWithState: FCWithChildren<{ - sx?: SxProps; -}> = ({ sx }) => { - const context = useTestAndEarnContext(); - - if (context.draws?.current?.entry?.status === DrawEntryStatus.winner) { - return ; - } - - // when the user does not have any unclaimed prizes, don't render anything - return null; -}; diff --git a/nym-connect/desktop/src/components/Growth/TestAndEarnWinnerWalletAddress.tsx b/nym-connect/desktop/src/components/Growth/TestAndEarnWinnerWalletAddress.tsx deleted file mode 100644 index deea1049e7..0000000000 --- a/nym-connect/desktop/src/components/Growth/TestAndEarnWinnerWalletAddress.tsx +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import { Box } from '@mui/material'; -import { SxProps } from '@mui/system'; -import Content from './content/TestAndEarn/WinnerEntersWalletAddress.mdx'; - -export const TestAndEarnWinnerWalletAddress: FCWithChildren<{ - sx?: SxProps; -}> = () => ( - - - -); diff --git a/nym-connect/desktop/src/components/Growth/content/TestAndEarn/Error.mdx b/nym-connect/desktop/src/components/Growth/content/TestAndEarn/Error.mdx deleted file mode 100644 index 05afd5a492..0000000000 --- a/nym-connect/desktop/src/components/Growth/content/TestAndEarn/Error.mdx +++ /dev/null @@ -1,17 +0,0 @@ -import { Alert, AlertTitle, Link } from '@mui/material'; -import { TestAndEarnError } from '../../TestAndEarnError'; - - - Oh no! Something went wrong - - Sorry about that. Here is some more information about the error that occurred: - - - - Any error reports that you send us will contain information about your client, the gateway you're using and your IP address. - - We need this information to make Nym better for everyone. - - - -If you'd like more information about Test&Earn please look on the Shipyard website. diff --git a/nym-connect/desktop/src/components/Growth/content/TestAndEarn/Stage0_intro.mdx b/nym-connect/desktop/src/components/Growth/content/TestAndEarn/Stage0_intro.mdx deleted file mode 100644 index 557a800084..0000000000 --- a/nym-connect/desktop/src/components/Growth/content/TestAndEarn/Stage0_intro.mdx +++ /dev/null @@ -1,25 +0,0 @@ -import { Card, CardContent, Link, Typography } from '@mui/material'; -import { TestAndEarnTakePart } from '../../TestAndEarnTakePart'; - -### Test privacy & Earn tokens! - - -Help us stress test the Nym privacy system and have the chance to earn 1000 NYMs per day! - - -All you need to do is: - -1. Make sure you're running NymConnect and it is connected. -2. Note your reference number. -3. NymConnect will ping you a task every day. - -Complete the task, post it on Twitter #PrivacyLovesCompany or Telegram along with your reference number! - -Thank you for being part of the Nym community and helping to build a flourishing and free digital society. #PrivacyLovesCompany and we love you! - - - - - - diff --git a/nym-connect/desktop/src/components/Growth/content/TestAndEarn/WinnerEntersWalletAddress.mdx b/nym-connect/desktop/src/components/Growth/content/TestAndEarn/WinnerEntersWalletAddress.mdx deleted file mode 100644 index d519ce49eb..0000000000 --- a/nym-connect/desktop/src/components/Growth/content/TestAndEarn/WinnerEntersWalletAddress.mdx +++ /dev/null @@ -1,9 +0,0 @@ -import { TestAndEarnEnterWalletAddress } from '../../TestAndEarnEnterWalletAddress'; - -### 🎉 Congratulations! One more thing... - -We need one more thing from you, and that is your wallet address: - - - -Once you've submitting your wallet address over the mixnet, we will be in touch to arrange sending your tokens to you. \ No newline at end of file diff --git a/nym-connect/desktop/src/components/Growth/content/TestAndEarnNotAvaialble.mdx b/nym-connect/desktop/src/components/Growth/content/TestAndEarnNotAvaialble.mdx deleted file mode 100644 index fc9a0a3c5d..0000000000 --- a/nym-connect/desktop/src/components/Growth/content/TestAndEarnNotAvaialble.mdx +++ /dev/null @@ -1,3 +0,0 @@ -## 😕 Sorry, Test&Earn is only accessible while you are connected to the mixnet - -Please connect to any service provider and try again once the connection has been established. \ No newline at end of file diff --git a/nym-connect/desktop/src/components/Growth/content/assets/matrix.webp b/nym-connect/desktop/src/components/Growth/content/assets/matrix.webp deleted file mode 100644 index 2b1517166c..0000000000 Binary files a/nym-connect/desktop/src/components/Growth/content/assets/matrix.webp and /dev/null differ diff --git a/nym-connect/desktop/src/components/Growth/content/assets/winner.webp b/nym-connect/desktop/src/components/Growth/content/assets/winner.webp deleted file mode 100644 index 3fbecb9f99..0000000000 Binary files a/nym-connect/desktop/src/components/Growth/content/assets/winner.webp and /dev/null differ diff --git a/nym-connect/desktop/src/components/Growth/content/en.yaml b/nym-connect/desktop/src/components/Growth/content/en.yaml deleted file mode 100644 index 849323e24e..0000000000 --- a/nym-connect/desktop/src/components/Growth/content/en.yaml +++ /dev/null @@ -1,43 +0,0 @@ -testAndEarn: - mainWindow: - button: - text: - default: Join Test&Earn - entered: Test&Earn - claim: Claim your reward - popup: - disconnected: Test&Earn is only available when connected. Please connect to any service provider. - help: - url: https://shipyard.nymtech.net/test-and-win - popupWindow: - title: NymConnect Test&Earn 🌈 - notifications: - takePart: - title: Thanks for taking part in Ter&Earn - body: Watch out for new tasks 👀 and take part to earn - youAreInDraw: - title: Thanks for completing the task ✨ - body: Post a message on Telegram, Discord or Twitter for a chance to to be selected 🤞 good luck - task: - afterText: Copy your reference number - beforeSocials: "And include it in your post to:" - draw: - next: - header: The next task starts - winner: - claimButton: - text: Claim your reward! - card: - header: You are a top contributor! - text: Congratulations, you have earned the reward for - status: - chip: - Pending: Good luck 🤞 - Winner: Rewarded! - Claimed: Claimed - NoWin: No rewards - text: - Pending: Task completed. Good luck 🤞 - Winner: Well done 🎉 - Claimed: You have claimed the reward 💰 - NoWin: Sorry you were not a top contributor, better luck next time! diff --git a/nym-connect/desktop/src/components/Growth/context/TestAndEarnContext.tsx b/nym-connect/desktop/src/components/Growth/context/TestAndEarnContext.tsx deleted file mode 100644 index ddf601634f..0000000000 --- a/nym-connect/desktop/src/components/Growth/context/TestAndEarnContext.tsx +++ /dev/null @@ -1,271 +0,0 @@ -/* eslint-disable @typescript-eslint/naming-convention */ -import React, { createContext, useCallback, useContext, useMemo, useState } from 'react'; -import { forage } from '@tauri-apps/tauri-forage'; -import { invoke } from '@tauri-apps/api'; -import { ClientId, DrawEntry, Draws, Registration } from './types'; -import { useClientContext } from '../../../context/main'; - -export type TTestAndEarnContext = { - loadedOnce: boolean; - loading: boolean; - clientDetails?: ClientId; - registration?: Registration; - walletAddress?: string; - draws?: Draws; - isWinnerWithUnclaimedPrize?: boolean; - isEnterWallet?: boolean; - error?: string; - setWalletAddress: (newWalletAddress: string) => void; - clearStorage: () => Promise; - toggleGrowthWindow: (windowTitle?: string) => Promise; - setAndStoreClientId: (newClientId: ClientId) => Promise; - setAndStoreRegistration: (registration: Registration) => Promise; - enterDraw: (drawId: string) => Promise; - claim: (drawId: string, walletAddress: string) => Promise; - refresh: () => Promise; -}; - -const defaultValue: TTestAndEarnContext = { - loadedOnce: false, - loading: true, - setWalletAddress: () => undefined, - clearStorage: async () => undefined, - toggleGrowthWindow: async () => undefined, - setAndStoreRegistration: async () => undefined, - setAndStoreClientId: async () => undefined, - enterDraw: async () => ({} as DrawEntry), - claim: async () => undefined, - refresh: async () => undefined, -}; - -export const TestAndEarnContext = createContext(defaultValue); - -const CLIENT_ID_KEY = 'tne_client_id'; -const REGISTRATION_KEY = 'tne_registration'; - -export const TestAndEarnContextProvider: FCWithChildren = ({ children }) => { - const clientContext = useClientContext(); - const [loadedOnce, setLoadedOnce] = useState(false); - const [loading, setLoading] = useState(true); - const [walletAddress, setWalletAddress] = useState(); - const [registration, setRegistration] = useState(); - const [clientDetails, setClientDetails] = useState(); - const [draws, setDraws] = useState(); - - const setAndStoreClientId = async (newClientId: ClientId) => { - await forage.setItem({ key: CLIENT_ID_KEY, value: newClientId } as any)(); - setClientDetails((prevState) => { - if ( - prevState?.client_id !== newClientId.client_id || - prevState?.client_id_signature !== newClientId.client_id_signature - ) { - console.log('Setting client details'); - return newClientId; - } - console.log('Skipping client details'); - return prevState; - }); - }; - const loadClientDetails = async () => { - const data: ClientId | undefined = await forage.getItem({ key: CLIENT_ID_KEY })(); - if (data) { - try { - setClientDetails((prevState) => { - if (prevState?.client_id !== data.client_id || prevState?.client_id_signature !== data.client_id_signature) { - console.log('Setting client details'); - return data; - } - console.log('Skipping client details'); - return prevState; - }); - } catch (e) { - console.error('Failed to get registration'); - } - } else { - const clientId: ClientId = await invoke('growth_tne_get_client_id'); - await setAndStoreClientId(clientId); - } - }; - - const loadRegistration = async () => { - const data: Registration | undefined = await forage.getItem({ key: REGISTRATION_KEY })(); - if (data) { - try { - setRegistration((prevState) => { - if ( - prevState?.timestamp !== data.timestamp || - prevState.client_id_signature !== data.client_id_signature || - prevState.id !== data.id - ) { - console.log('Setting registration'); - return data; - } - console.log('Skipping registration'); - return prevState; - }); - } catch (e) { - console.error('Failed to get registration'); - } - } - }; - - const loadDraws = React.useCallback(async () => { - setLoading(true); - let clientDetailsForDraws = clientDetails; - try { - if (!clientDetailsForDraws) { - console.log('[loadDraws] client details not set, trying to get...'); - clientDetailsForDraws = await invoke('growth_tne_get_client_id'); - } - - if (!clientDetailsForDraws) { - console.log('[loadDraws] failed to get client details not set, skipping...'); - setLoading(false); - setLoadedOnce(true); - return; - } - - const newDraws: Draws = await invoke('growth_tne_get_draws', { clientDetails: clientDetailsForDraws }); - console.log('[loadDraws] draws = ', newDraws); - - // find the entered draw and keep a reference - const entered = newDraws.draws.find((draw) => draw.draw_id === newDraws.current?.id); - if (newDraws.current) { - newDraws.current.entry = entered; - } - - console.log('[loadDraws] setting draws'); - setDraws(newDraws); - } catch (e) { - console.error('Could not get draws: ', e); - } - setLoading(false); - setLoadedOnce(true); - console.log('[loadDraws] done, loaded once'); - }, [clientDetails]); - - React.useEffect(() => { - loadClientDetails().catch(console.error); - loadRegistration().catch(console.error); - }, []); - - React.useEffect(() => { - if (registration && clientContext.connectionStatus === 'connected') { - setTimeout(() => { - loadDraws().catch(console.error); - }, 1000 * 3); - } - }, [registration?.id, registration?.timestamp, clientContext.connectionStatus]); - - const refresh = React.useCallback(async () => { - console.log('Refreshing...'); - - console.log('Loading client details...'); - await loadClientDetails(); - - console.log('Loading registration...'); - await loadRegistration(); - - console.log('Loading draws...'); - await loadDraws(); - - console.log('Refresh complete.'); - }, [clientDetails]); - - const clearStorage = async () => { - await forage.setItem({ key: REGISTRATION_KEY, value: undefined })(); - }; - - const toggleGrowthWindow = useCallback(async (windowTitle?: string) => { - try { - await invoke('growth_tne_toggle_window', { windowTitle }); - } catch (e) { - console.error('Failed to toggle growth window', e); - } - }, []); - - const setAndStoreRegistration = async (newRegistration: Registration) => { - await forage.setItem({ key: REGISTRATION_KEY, value: newRegistration } as any)(); - setRegistration(newRegistration); - }; - - const enterDraw = async (drawId: string): Promise => { - if (!clientDetails) { - throw new Error('No client details set'); - } - if (!draws) { - throw new Error('No draws set'); - } - - const existingEntry: DrawEntry | undefined = draws.draws.filter((d) => d.draw_id === drawId)[0]; - if (existingEntry) { - throw new Error('Already entered into draw'); - } - - const entry: DrawEntry = await invoke('growth_tne_enter_draw', { clientDetails, drawId }); - console.log('Entered draw', { entry }); - - await loadDraws(); - - return entry; - }; - - const claim = async (drawId: string, newWalletAddress: string) => { - if (!clientDetails) { - throw new Error('No client details set'); - } - if (!draws) { - throw new Error('No draws set'); - } - if (!registration) { - throw new Error('No registration set'); - } - - const registrationId = registration.id; - - const args = { - registrationId, - clientDetails, - drawId, - walletAddress: newWalletAddress, - }; - console.log({ args }); - await invoke('growth_tne_submit_wallet_address', args); - - await loadDraws(); - }; - - const contextValue = useMemo( - () => ({ - loadedOnce, - loading, - clientDetails, - registration, - walletAddress, - draws, - clearStorage, - toggleGrowthWindow, - setWalletAddress, - setAndStoreClientId, - setAndStoreRegistration, - enterDraw, - refresh, - claim, - }), - [ - loadedOnce, - loading, - walletAddress, - registration, - refresh, - draws, - draws?.current?.last_modified, - draws?.current?.entry, - draws?.draws.length, - clientDetails, - ], - ); - return {children}; -}; - -export const useTestAndEarnContext = () => useContext(TestAndEarnContext); diff --git a/nym-connect/desktop/src/components/Growth/context/mocks/TestAndEarnContext.tsx b/nym-connect/desktop/src/components/Growth/context/mocks/TestAndEarnContext.tsx deleted file mode 100644 index b4388ddb72..0000000000 --- a/nym-connect/desktop/src/components/Growth/context/mocks/TestAndEarnContext.tsx +++ /dev/null @@ -1,262 +0,0 @@ -/* eslint-disable @typescript-eslint/naming-convention */ -import React from 'react'; -import { DateTime } from 'luxon'; -import { TTestAndEarnContext, TestAndEarnContext } from '../TestAndEarnContext'; -import { DrawEntry, DrawEntryStatus, DrawWithWordOfTheDay } from '../types'; - -const methodDefaults = { - loadedOnce: true, - loading: false, - refresh: async () => undefined, - setAndStoreClientId: async () => undefined, - setAndStoreRegistration: async () => undefined, - clearStorage: async () => undefined, - toggleGrowthWindow: async () => undefined, - setWalletAddress: async () => undefined, - enterDraw: async () => ({} as DrawEntry), - claim: async () => undefined, -}; - -const mockValues_NotRegistered: TTestAndEarnContext = { - ...methodDefaults, -}; - -export const MockTestAndEarnProvider_NotRegistered: FCWithChildren = ({ children }) => ( - {children} -); - -export const testMarkdown = `**Create a sentence including "Nym" and one or more of the following words** *(in any language)*: - -- Privacy -- Pleasure -- Pineapple -- Mix -`; - -const mockValues_Registered: TTestAndEarnContext = { - ...methodDefaults, - registration: { - id: '1234', - client_id_signature: 'signature', - client_id: '5678', - timestamp: '2022-12-12T18:17:37.840Z', - }, -}; - -export const MockTestAndEarnProvider_Registered: FCWithChildren = ({ children }) => ( - {children} -); - -const allDraws: DrawEntry[] = [ - { - draw_id: '1111', - timestamp: DateTime.now().toISO(), - id: 'AAAA', - status: DrawEntryStatus.pending, - }, - { - draw_id: '2222', - timestamp: DateTime.now().toISO(), - id: 'BBBB', - status: DrawEntryStatus.noWin, - }, - { - draw_id: '2222', - timestamp: DateTime.now().toISO(), - id: 'BBBB', - status: DrawEntryStatus.claimed, - }, - { - draw_id: '2222', - timestamp: DateTime.now().toISO(), - id: 'BBBB', - status: DrawEntryStatus.winner, - }, -]; - -const draws: DrawEntry[] = [ - { - draw_id: '1111', - timestamp: DateTime.now().toISO(), - id: 'AAAA', - status: DrawEntryStatus.pending, - }, - { - draw_id: '2222', - timestamp: DateTime.now().toISO(), - id: 'BBBB', - status: DrawEntryStatus.noWin, - }, -]; - -const drawsWithWin: DrawEntry[] = [ - { - draw_id: '1111', - timestamp: DateTime.now().toISO(), - id: 'AAAA', - status: DrawEntryStatus.winner, - }, - { - draw_id: '2222', - timestamp: DateTime.now().toISO(), - id: 'BBBB', - status: DrawEntryStatus.noWin, - }, -]; - -const drawsWithClaim: DrawEntry[] = [ - { - draw_id: '1111', - timestamp: DateTime.now().toISO(), - id: 'AAAA', - status: DrawEntryStatus.claimed, - }, - { - draw_id: '2222', - timestamp: DateTime.now().toISO(), - id: 'BBBB', - status: DrawEntryStatus.noWin, - }, -]; - -const current: DrawWithWordOfTheDay = { - id: '1111', - start_utc: DateTime.now().toISO(), - end_utc: DateTime.now().plus({ day: 1 }).minus({ second: 25 }).toISO(), - last_modified: DateTime.now().toISO(), - word_of_the_day: testMarkdown, -}; - -const mockValues_RegisteredWithAllDrawsAndEntry: TTestAndEarnContext = { - ...mockValues_Registered, - draws: { - current: { - ...current, - }, - draws: allDraws, - }, -}; - -export const MockTestAndEarnProvider_RegisteredWithAllDraws: FCWithChildren = ({ children }) => ( - - {children} - -); - -const mockValues_RegisteredWithDrawsNoCurrent: TTestAndEarnContext = { - ...mockValues_Registered, - draws: { - draws: drawsWithClaim, - }, -}; - -export const MockTestAndEarnProvider_RegisteredWithDrawsNoCurrent: FCWithChildren = ({ children }) => ( - {children} -); - -const mockValues_RegisteredWithDraws: TTestAndEarnContext = { - ...mockValues_Registered, - draws: { - current, - draws, - }, -}; - -export const MockTestAndEarnProvider_RegisteredWithDraws: FCWithChildren = ({ children }) => ( - {children} -); - -const mockValues_RegisteredWithDrawsAndEntry: TTestAndEarnContext = { - ...mockValues_Registered, - draws: { - current: { - ...current, - entry: mockValues_RegisteredWithDraws.draws!.draws[0], - }, - draws, - }, -}; - -export const MockTestAndEarnProvider_RegisteredWithDrawsAndEntry: FCWithChildren = ({ children }) => ( - {children} -); - -const mockValues_RegisteredWithDrawsAndEntryAndWinner: TTestAndEarnContext = { - ...mockValues_Registered, - draws: { - current: { - ...current, - entry: drawsWithWin[0], - }, - draws: drawsWithWin, - }, - isWinnerWithUnclaimedPrize: true, -}; - -export const MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndWinner = ({ - children, -}: { - children: React.ReactNode; -}) => ( - - {children} - -); - -const mockValues_RegisteredWithDrawsAndEntryAndNoWinner: TTestAndEarnContext = { - ...mockValues_RegisteredWithDrawsAndEntry, - isWinnerWithUnclaimedPrize: false, -}; - -export const MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndNoWinner = ({ - children, -}: { - children: React.ReactNode; -}) => ( - - {children} - -); - -const mockValues_RegisteredWithDrawsAndEntryAndWinnerCollectWallet: TTestAndEarnContext = { - ...mockValues_Registered, - draws: { - draws: drawsWithWin, - }, -}; - -export const MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndWinnerCollectWallet = ({ - children, -}: { - children: React.ReactNode; -}) => ( - - {children} - -); - -const mockValues_RegisteredWithDrawsAndEntryAndWinnerClaimed: TTestAndEarnContext = { - ...mockValues_Registered, - draws: { - draws: drawsWithClaim, - }, -}; - -export const MockTestAndEarnProvider_RegisteredWithDrawsAndEntryAndWinnerClaimed = ({ - children, -}: { - children: React.ReactNode; -}) => ( - - {children} - -); - -const mockValues_RegisteredAndError: TTestAndEarnContext = { - ...mockValues_Registered, - error: 'Error message text will go here', -}; - -export const MockTestAndEarnProvider_RegisteredAndError: FCWithChildren = ({ children }) => ( - {children} -); diff --git a/nym-connect/desktop/src/components/Growth/context/types.ts b/nym-connect/desktop/src/components/Growth/context/types.ts deleted file mode 100644 index c7574b282f..0000000000 --- a/nym-connect/desktop/src/components/Growth/context/types.ts +++ /dev/null @@ -1,64 +0,0 @@ -export interface ClientId { - client_id: string; - client_id_signature: string; -} - -export interface Registration { - id: string; - client_id: string; - client_id_signature: string; - timestamp: string; -} - -export interface DrawEntryPartial { - draw_id: string; - client_id: string; - client_id_signature: string; -} - -export enum DrawEntryStatus { - pending = 'Pending', - winner = 'Winner', - noWin = 'NoWin', - claimed = 'Claimed', -} - -export interface DrawEntry { - id: string; - draw_id: string; - timestamp: string; - status: DrawEntryStatus; -} - -export interface DrawWithWordOfTheDay { - id: string; - start_utc: string; - end_utc: string; - word_of_the_day?: string; - last_modified: string; - entry?: DrawEntry; -} - -export interface ClaimPartial { - draw_id: string; - registration_id: string; - client_id: string; - client_id_signature: string; - wallet_address: string; -} - -export interface Winner { - id: string; - client_id: string; - draw_id: string; - timestamp: string; - winner_reg_id: string; - winner_wallet_address?: string; - winner_claim_timestamp?: string; -} - -export interface Draws { - current?: DrawWithWordOfTheDay; - next?: DrawWithWordOfTheDay; - draws: DrawEntry[]; -} diff --git a/nym-connect/desktop/src/components/HelpPage.tsx b/nym-connect/desktop/src/components/HelpPage.tsx deleted file mode 100644 index 5cc7815117..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/HelpPageActions.tsx b/nym-connect/desktop/src/components/HelpPageActions.tsx deleted file mode 100644 index 17e513120f..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/HelpPageImage.tsx b/nym-connect/desktop/src/components/HelpPageImage.tsx deleted file mode 100644 index 69fa38ca31..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/HelpPageStepIndicator.tsx b/nym-connect/desktop/src/components/HelpPageStepIndicator.tsx deleted file mode 100644 index 02d0b3338e..0000000000 --- a/nym-connect/desktop/src/components/HelpPageStepIndicator.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { Box } from '@mui/material'; - -const Step = ({ highlight }: { highlight: boolean }) => ( - -); - -export const StepIndicator = ({ step }: { step: number }) => ( - - - = 2} /> - = 3} /> - -); diff --git a/nym-connect/desktop/src/components/InfoModal.tsx b/nym-connect/desktop/src/components/InfoModal.tsx deleted file mode 100644 index 8b1157689e..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/IpAddressAndPort.tsx b/nym-connect/desktop/src/components/IpAddressAndPort.tsx deleted file mode 100644 index 4e7618ed87..0000000000 --- a/nym-connect/desktop/src/components/IpAddressAndPort.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import { Box, Stack, Tooltip, Typography } from '@mui/material'; -import React from 'react'; -import { styled } from '@mui/system'; -import { writeText } from '@tauri-apps/api/clipboard'; -import CheckCircleOutlineIcon from '@mui/icons-material/CheckCircleOutline'; - -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 - - - - - - SOCKS5 proxy hostname copied to the clipboard - - ) : ( - <>Click to copy SOCKS5 proxy hostname - ) - } - > - { - await writeText(`${ipAddress}`); - setIpAddressCopied(true); - }} - > - {ipAddress} - - - - - SOCKS5 proxy port copied to the clipboard - - ) : ( - <>Click to copy SOCKS5 proxy port - ) - } - > - { - await writeText(`${port}`); - setPortCopied(true); - }} - > - {port} - - - - - ); -}; diff --git a/nym-connect/desktop/src/components/IpAddressAndPortModal.tsx b/nym-connect/desktop/src/components/IpAddressAndPortModal.tsx deleted file mode 100644 index fcb0f1dfaa..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/LogViewer/index.tsx b/nym-connect/desktop/src/components/LogViewer/index.tsx deleted file mode 100644 index f2a9d2e6d0..0000000000 --- a/nym-connect/desktop/src/components/LogViewer/index.tsx +++ /dev/null @@ -1,97 +0,0 @@ -import React, { FC, useEffect, useRef, useState } from 'react'; -import type { UnlistenFn } from '@tauri-apps/api/event'; -import { listen } from '@tauri-apps/api/event'; -import { Box, Paper, Chip, Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from '@mui/material'; - -// see https://github.com/tauri-apps/tauri-plugin-log/blob/dev/webview-src/index.ts#L4 -enum LogLevel { - Trace = 1, - Debug, - Info, - Warn, - Error, -} - -const getLogLevelName = (value: LogLevel) => { - switch (value) { - case LogLevel.Trace: - return 'Trace'; - case LogLevel.Debug: - return 'Debug'; - case LogLevel.Info: - return 'Info'; - case LogLevel.Warn: - return 'Warn'; - case LogLevel.Error: - return 'Error'; - default: - return 'Unknown'; - } -}; - -// see https://github.com/tauri-apps/tauri-plugin-log/blob/dev/webview-src/index.ts#L147 -interface RecordPayload { - level: LogLevel; - message: string; -} - -export const LogViewer: FC = () => { - const unlisten = useRef(); - const messages = useRef([]); - const [messageCount, setMessageCount] = useState(0); - - useEffect(() => { - listen('log://log', (event) => { - console.log(event.payload); - const payload = event.payload as RecordPayload; - messages.current.unshift(payload); - setMessageCount((prev) => prev + 1); - }).then((fn) => { - unlisten.current = fn; - }); - - return () => { - if (unlisten.current) { - unlisten.current(); - } - }; - }, []); - - return ( - - - - - - - Severity - Log message - - - - {messages.current.map((m) => ( - - - - - {m.message} - - ))} - -
-
-
- theme.palette.divider, - }} - > - {messageCount} log entries since opening this window - -
- ); -}; diff --git a/nym-connect/desktop/src/components/NeedHelp.tsx b/nym-connect/desktop/src/components/NeedHelp.tsx deleted file mode 100644 index 12d9587a5f..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/PowerButton/PowerButton.tsx b/nym-connect/desktop/src/components/PowerButton/PowerButton.tsx deleted file mode 100644 index 34def91f9f..0000000000 --- a/nym-connect/desktop/src/components/PowerButton/PowerButton.tsx +++ /dev/null @@ -1,124 +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; - }; - - return ( - !disabled && setHover(true)} - onMouseLeave={() => !disabled && setHover(false)} - > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ); -}; diff --git a/nym-connect/desktop/src/components/PowerButton/power-button.css b/nym-connect/desktop/src/components/PowerButton/power-button.css deleted file mode 100644 index a493d8df25..0000000000 --- a/nym-connect/desktop/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 { - 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/desktop/src/components/ServiceProviderPopup.tsx b/nym-connect/desktop/src/components/ServiceProviderPopup.tsx deleted file mode 100644 index 660fee4134..0000000000 --- a/nym-connect/desktop/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/desktop/src/components/TooltipInfo.tsx b/nym-connect/desktop/src/components/TooltipInfo.tsx deleted file mode 100644 index 7a78242c08..0000000000 --- a/nym-connect/desktop/src/components/TooltipInfo.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import React from 'react'; -import { Divider, Stack, Typography } from '@mui/material'; -import { ServiceProvider, Gateway } from 'src/types/directory'; - -export const ServiceProviderInfo = ({ - serviceProvider, - gateway, -}: { - serviceProvider: ServiceProvider; - gateway: Gateway; -}) => ( - - - Connection info - - - - Gateway {gateway.identity} - - - - Service provider {serviceProvider.address.slice(0, 35)}... - - -); - -export const GatwayWarningInfo = () => ( - - - Connection issue - - - Try disconnecting and connecting again - -); diff --git a/nym-connect/desktop/src/config.ts b/nym-connect/desktop/src/config.ts deleted file mode 100644 index f405ceac15..0000000000 --- a/nym-connect/desktop/src/config.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const config = { - DOCS_BASE_URL: 'https://nymtech.net/docs', -}; diff --git a/nym-connect/desktop/src/context/main.tsx b/nym-connect/desktop/src/context/main.tsx deleted file mode 100644 index 9e8f5f21af..0000000000 --- a/nym-connect/desktop/src/context/main.tsx +++ /dev/null @@ -1,309 +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 * as Sentry from '@sentry/react'; -import { useEvents } from 'src/hooks/events'; -import { UserDefinedGateway, UserDefinedSPAddress } from 'src/types/service-provider'; -import { ConnectionStatusKind, GatewayPerformance, PrivacyLevel, UserData } from '../types'; -import { ConnectionStatsItem } from '../components/ConnectionStats'; -import { ServiceProvider, Gateway } from '../types/directory'; -import initSentry from '../sentry'; - -type ModeType = 'light' | 'dark'; - -export type TClientContext = { - mode: ModeType; - appVersion?: string; - userData?: UserData; - connectionStatus: ConnectionStatusKind; - connectionStats?: ConnectionStatsItem[]; - connectedSince?: DateTime; - error?: Error; - gatewayPerformance: GatewayPerformance; - selectedProvider?: ServiceProvider; - selectedGateway?: Gateway; - showInfoModal: boolean; - userDefinedGateway?: UserDefinedGateway; - userDefinedSPAddress: UserDefinedSPAddress; - serviceProviders?: ServiceProvider[]; - gateways?: Gateway[]; - showFeedbackNote: boolean; - setMode: (mode: ModeType) => void; - clearError: () => void; - setConnectionStatus: (connectionStatus: ConnectionStatusKind) => void; - setConnectionStats: (connectionStats: ConnectionStatsItem[] | undefined) => void; - setConnectedSince: (connectedSince: DateTime | undefined) => void; - setShowInfoModal: (show: boolean) => void; - setServiceProvider: () => Promise; - setGateway: () => Promise; - startConnecting: () => Promise; - startDisconnecting: () => Promise; - setUserDefinedGateway: React.Dispatch>; - setUserDefinedSPAddress: React.Dispatch>; - setMonitoring: (value: boolean) => Promise; - setPrivacyLevel: (value: PrivacyLevel) => Promise; - setShowFeedbackNote: (value: boolean) => void; -}; - -function getRandomFromList(items: T[]): T { - return items[Math.floor(Math.random() * items.length)]; -} - -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 [selectedGateway, setSelectedGateway] = React.useState(); - const [serviceProviders, setServiceProviders] = React.useState(); - const [gateways, setGateways] = 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, - address: undefined, - }); - const [userDefinedSPAddress, setUserDefinedSPAddress] = useState({ - isActive: false, - address: undefined, - }); - const [userData, setUserData] = useState(); - const [showFeedbackNote, setShowFeedbackNote] = useState(true); - - const getAppVersion = async () => { - const version = await getVersion(); - return version; - }; - - const getUserData = async () => { - const data = await invoke('get_user_data'); - if (!data.privacy_level) { - data.privacy_level = 'High'; - } - setUserData(data); - if (data.selected_gateway) { - setUserDefinedGateway({ - address: data.selected_gateway.address, - isActive: data.selected_gateway.is_active || false, - }); - } - if (data.selected_sp) { - setUserDefinedSPAddress({ address: data.selected_sp.address, isActive: data.selected_sp.is_active || false }); - } - return data; - }; - - useEffect(() => { - const initSentryClient = async () => { - const data = await getUserData(); - if (data.monitoring) { - await initSentry(); - } - }; - - initSentryClient(); - }, []); - - useEffect(() => { - const saveUserGateway = async () => { - await invoke('set_selected_gateway', { - gateway: { address: userDefinedGateway.address, is_active: userDefinedGateway.isActive }, - }); - }; - saveUserGateway(); - }, [userDefinedGateway]); - - useEffect(() => { - const saveUserServiceProvider = async () => { - await invoke('set_selected_sp', { - serviceProvider: { address: userDefinedSPAddress.address, is_active: userDefinedSPAddress.isActive }, - }); - }; - saveUserServiceProvider(); - }, [userDefinedSPAddress]); - - const initialiseApp = async () => { - const fetchedServices = await invoke('get_services'); - const fetchedGateways = await invoke('get_gateways'); - const AppVersion = await getAppVersion(); - - setAppVersion(AppVersion); - setServiceProviders(fetchedServices); - setGateways(fetchedGateways); - }; - - useEvents({ - onError: (e) => { - setError(e); - Sentry.captureException(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); - Sentry.captureException(e); - } - }, []); - - 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); - } - }, []); - - const shouldUseUserGateway = !!userDefinedGateway.address && userDefinedGateway.isActive; - const shouldUseUserSP = !!userDefinedSPAddress.address && userDefinedSPAddress.isActive; - - const buildServiceProvider = async (serviceProvider: ServiceProvider) => { - const sp = { ...serviceProvider }; - if (shouldUseUserSP) sp.address = userDefinedSPAddress.address as string; - return sp; - }; - - const buildGateway = async (gateway: Gateway) => { - const gw = { ...gateway }; - if (shouldUseUserGateway) gw.identity = userDefinedGateway.address as string; - return gw; - }; - - const setServiceProvider = async () => { - if (serviceProviders) { - const randomServiceProvider = getRandomFromList(serviceProviders); - const withUserDefinitions = await buildServiceProvider(randomServiceProvider); - await invoke('set_service_provider', { - serviceProvider: shouldUseUserSP ? userDefinedSPAddress.address : withUserDefinitions.address, - }); - setSelectedProvider(withUserDefinitions); - } - return undefined; - }; - - const setGateway = async () => { - if (gateways) { - let randomGateway; - if (userData?.privacy_level === 'Medium') { - randomGateway = await invoke('select_gateway_with_low_latency_from_list', { gateways }); - } else { - randomGateway = getRandomFromList(gateways); - } - const withUserDefinitions = await buildGateway(randomGateway); - await invoke('set_gateway', { - gateway: shouldUseUserGateway ? userDefinedGateway.address : withUserDefinitions.identity, - }); - setSelectedGateway(withUserDefinitions); - } - return undefined; - }; - - const clearError = () => setError(undefined); - - const setMonitoring = async (value: boolean) => { - await invoke('set_monitoring', { enabled: value }); - // refresh user data - await getUserData(); - }; - - const setPrivacyLevel = async (value: PrivacyLevel) => { - await invoke('set_privacy_level', { privacyLevel: value }); - // refresh service providers list - const fetchedServices = await invoke('get_services'); - setServiceProviders(fetchedServices); - // reset any previously selected SP - await invoke('set_selected_sp', { - serviceProvider: { is_active: false }, - }); - // refresh user data - await getUserData(); - }; - - const contextValue = useMemo( - () => ({ - mode, - appVersion, - setMode, - error, - clearError, - connectionStatus, - setConnectionStatus, - connectionStats, - showInfoModal, - setConnectionStats, - selectedProvider, - selectedGateway, - serviceProviders, - connectedSince, - userData, - showFeedbackNote, - setConnectedSince, - setServiceProvider, - setGateway, - startConnecting, - startDisconnecting, - gatewayPerformance, - setShowInfoModal, - userDefinedSPAddress, - userDefinedGateway, - setUserDefinedGateway, - setUserDefinedSPAddress, - setMonitoring, - setPrivacyLevel, - setShowFeedbackNote, - }), - [ - mode, - appVersion, - error, - showInfoModal, - serviceProviders, - connectedSince, - connectionStatus, - connectionStats, - connectedSince, - gatewayPerformance, - selectedProvider, - selectedGateway, - userDefinedGateway, - userDefinedSPAddress, - userData, - showFeedbackNote, - ], - ); - - return {children}; -}; - -export const useClientContext = () => useContext(ClientContext); diff --git a/nym-connect/desktop/src/context/mocks/main.tsx b/nym-connect/desktop/src/context/mocks/main.tsx deleted file mode 100644 index 2da2661939..0000000000 --- a/nym-connect/desktop/src/context/mocks/main.tsx +++ /dev/null @@ -1,39 +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', address: '123abc' }, - gatewayPerformance: 'Good', - showInfoModal: false, - userDefinedGateway: { isActive: false, address: '' }, - userDefinedSPAddress: { isActive: false, address: '' }, - userData: { monitoring: false, privacy_level: 'High' }, - showFeedbackNote: false, - setShowInfoModal: () => {}, - setMode: () => {}, - clearError: () => {}, - setConnectedSince: () => {}, - setConnectionStats: () => {}, - setConnectionStatus: () => {}, - startConnecting: async () => {}, - startDisconnecting: async () => {}, - setServiceProvider: async () => {}, - setGateway: async () => {}, - setUserDefinedGateway: () => {}, - setUserDefinedSPAddress: () => {}, - setMonitoring: async () => {}, - setPrivacyLevel: async () => {}, - setShowFeedbackNote: () => {}, -}; - -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/desktop/src/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf b/nym-connect/desktop/src/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf deleted file mode 100644 index 0fea34ba24..0000000000 Binary files a/nym-connect/desktop/src/fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf and /dev/null differ diff --git a/nym-connect/desktop/src/fonts/OpenSans-VariableFont_wdth,wght.ttf b/nym-connect/desktop/src/fonts/OpenSans-VariableFont_wdth,wght.ttf deleted file mode 100644 index 51dd3c3be2..0000000000 Binary files a/nym-connect/desktop/src/fonts/OpenSans-VariableFont_wdth,wght.ttf and /dev/null differ diff --git a/nym-connect/desktop/src/fonts/fonts.css b/nym-connect/desktop/src/fonts/fonts.css deleted file mode 100644 index bf875e952d..0000000000 --- a/nym-connect/desktop/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/desktop/src/growth.tsx b/nym-connect/desktop/src/growth.tsx deleted file mode 100644 index 683b49c2e1..0000000000 --- a/nym-connect/desktop/src/growth.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import { ErrorBoundary } from 'react-error-boundary'; -import { ClientContextProvider } from './context/main'; -import { ErrorFallback } from './components/Error'; -import { NymShipyardTheme } from './theme'; -import { TestAndEarnPopup } from './components/Growth/TestAndEarnPopup'; -import { TestAndEarnContextProvider } from './components/Growth/context/TestAndEarnContext'; - -const elem = document.getElementById('root-growth'); - -if (elem) { - const root = createRoot(elem); - root.render( - - - - - - - - - , - ); -} diff --git a/nym-connect/desktop/src/hooks/events.ts b/nym-connect/desktop/src/hooks/events.ts deleted file mode 100644 index 0b15e5347d..0000000000 --- a/nym-connect/desktop/src/hooks/events.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { useEffect, useRef } from 'react'; -import { listen, UnlistenFn } from '@tauri-apps/api/event'; -import * as Sentry from '@sentry/react'; -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); - Sentry.captureException(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/desktop/src/index.tsx b/nym-connect/desktop/src/index.tsx deleted file mode 100644 index 996825445d..0000000000 --- a/nym-connect/desktop/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/desktop/src/layouts/ConnectionLayout.tsx b/nym-connect/desktop/src/layouts/ConnectionLayout.tsx deleted file mode 100644 index d37c7ec888..0000000000 --- a/nym-connect/desktop/src/layouts/ConnectionLayout.tsx +++ /dev/null @@ -1,30 +0,0 @@ -import { Box } from '@mui/material'; -import React from 'react'; - -const layout = { - display: 'grid', - gridTemplateColumns: '1fr', - gridTemplateRows: '80px 180px 1fr', - gridColumnGap: '0px', - gridRowGap: '4px', - overflow: 'hidden', - height: '100%', -}; - -export const ConnectionLayout = ({ - TopContent, - ConnectButton, - BottomContent, -}: { - TopContent: React.ReactNode; - ConnectButton: React.ReactNode; - BottomContent: React.ReactNode; -}) => ( - - {TopContent} - - {ConnectButton} - - {BottomContent} - -); diff --git a/nym-connect/desktop/src/log.tsx b/nym-connect/desktop/src/log.tsx deleted file mode 100644 index ffce19c1d9..0000000000 --- a/nym-connect/desktop/src/log.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import React from 'react'; -import { createRoot } from 'react-dom/client'; -import { ErrorBoundary } from 'react-error-boundary'; -import { LogViewer } from './components/LogViewer'; -import { ErrorFallback } from './components/ErrorFallback'; -import { NymMixnetTheme } from './theme'; - -const Log = () => ( - - - - - -); - -const elem = document.getElementById('root-log'); - -if (elem) { - const root = createRoot(elem); - root.render(); -} diff --git a/nym-connect/desktop/src/pages/connection/Connected.tsx b/nym-connect/desktop/src/pages/connection/Connected.tsx deleted file mode 100644 index 1408b8644f..0000000000 --- a/nym-connect/desktop/src/pages/connection/Connected.tsx +++ /dev/null @@ -1,83 +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, Gateway } 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; - gateway?: Gateway; - clearError: () => void; - onConnectClick: (status: ConnectionStatusKind) => void; - closeInfoModal: () => void; -}> = ({ - error, - status, - showInfoModal, - gatewayPerformance, - ipAddress, - port, - connectedSince, - busy, - isError, - serviceProvider, - gateway, - clearError, - onConnectClick, - closeInfoModal, -}) => ( - <> - {error && } - - - - -
- } - ConnectButton={ - - } - BottomContent={ - - - - - - - } - /> - -); diff --git a/nym-connect/desktop/src/pages/connection/Disconnected.tsx b/nym-connect/desktop/src/pages/connection/Disconnected.tsx deleted file mode 100644 index 00e51b9221..0000000000 --- a/nym-connect/desktop/src/pages/connection/Disconnected.tsx +++ /dev/null @@ -1,74 +0,0 @@ -import React from 'react'; -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'; -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'; -import { useClientContext } from '../../context/main'; - -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 }) => { - 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/connection/index.tsx b/nym-connect/desktop/src/pages/connection/index.tsx deleted file mode 100644 index 725bfb23de..0000000000 --- a/nym-connect/desktop/src/pages/connection/index.tsx +++ /dev/null @@ -1,79 +0,0 @@ -import React from 'react'; -import * as Sentry from '@sentry/react'; -import { DateTime } from 'luxon'; -import { useClientContext } from 'src/context/main'; -import { Connected } from './Connected'; -import { Disconnected } from './Disconnected'; - -export const ConnectionPage = () => { - const context = useClientContext(); - const [busy, setBusy] = React.useState(); - - const handleConnectClick = async () => { - const currentStatus = context.connectionStatus; - if (currentStatus === 'connected' || currentStatus === 'disconnected') { - setBusy(true); - // eslint-disable-next-line default-case - switch (currentStatus) { - case 'disconnected': - Sentry.captureMessage('start connect', 'info'); - await context.setServiceProvider(); - await context.setGateway(); - await context.startConnecting(); - context.setConnectedSince(DateTime.now()); - context.setShowInfoModal(true); - break; - case 'connected': - Sentry.captureMessage('start disconnect', 'info'); - 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/desktop/src/pages/menu/Apps.tsx b/nym-connect/desktop/src/pages/menu/Apps.tsx deleted file mode 100644 index dc6584a859..0000000000 --- a/nym-connect/desktop/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: ['Matrix', 'Telegram', 'Keybase'], - wallets: ['Monero', 'Blockstream', 'Electrum', 'Alephium'], -}; - -export const CompatibleApps = () => ( - - - Supported apps - - - Messaging apps - - - - {appsSchema.messagingApps.map((app) => ( - - {app} - - ))} - - - - Wallets - - - - {appsSchema.wallets.map((wallet) => ( - - {wallet} - - ))} - - -); diff --git a/nym-connect/desktop/src/pages/menu/Guide.tsx b/nym-connect/desktop/src/pages/menu/Guide.tsx deleted file mode 100644 index 2323d68a82..0000000000 --- a/nym-connect/desktop/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/desktop/src/pages/menu/PrivacyLevelSettings.tsx b/nym-connect/desktop/src/pages/menu/PrivacyLevelSettings.tsx deleted file mode 100644 index 81582a2797..0000000000 --- a/nym-connect/desktop/src/pages/menu/PrivacyLevelSettings.tsx +++ /dev/null @@ -1,49 +0,0 @@ -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 '../../context/main'; -import { ConnectionStatusKind } from '../../types'; - -export const PrivacyLevelSettings = () => { - const { userData, setPrivacyLevel, connectionStatus } = useClientContext(); - const [speedBoost, setSpeedBoost] = useState(userData?.privacy_level !== 'High'); - const [loading, setLoading] = useState(false); - - const handleChange = async (e: ChangeEvent) => { - setLoading(true); - setSpeedBoost(e.target.checked); - Sentry.captureMessage(`privacy level switched to ${e.target.checked ? 'Medium' : 'High'}`, 'info'); - await setPrivacyLevel(e.target.checked ? 'Medium' : 'High'); - setLoading(false); - }; - - return ( - - - - - Speed boost - - - - } - label="Enable" - /> - - By activating this option, the connection speed will be relatively faster in exchange for relaxing some - privacy protections - - - - - - ); -}; diff --git a/nym-connect/desktop/src/pages/menu/index.tsx b/nym-connect/desktop/src/pages/menu/index.tsx deleted file mode 100644 index 285d368061..0000000000 --- a/nym-connect/desktop/src/pages/menu/index.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import React from 'react'; -import { Apps, HelpOutline, Settings, BugReport, PrivacyTip } from '@mui/icons-material'; -import { Stack, Link, List, ListItem, ListItemButton, ListItemIcon, ListItemText } 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: 'Privacy level', icon: PrivacyTip, path: 'privacy-level' }, - { title: 'Settings', icon: Settings, path: 'settings' }, - { title: 'Help improve the app', icon: BugReport, path: 'reporting' }, -]; - -export const Menu = () => ( - - - {menuSchema.map((item) => ( - - - - - - {' '} - {item.title} - - - - ))} - - - -); diff --git a/nym-connect/desktop/src/pages/menu/reporting/ErrorReporting.tsx b/nym-connect/desktop/src/pages/menu/reporting/ErrorReporting.tsx deleted file mode 100644 index baf465944c..0000000000 --- a/nym-connect/desktop/src/pages/menu/reporting/ErrorReporting.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import React, { ChangeEvent, useState } from 'react'; -import { Box, FormControl, FormControlLabel, FormHelperText, Stack, Switch, Typography } from '@mui/material'; -import { useClientContext } from '../../../context/main'; - -export const ErrorReporting = () => { - const { userData, setMonitoring } = useClientContext(); - const [enabled, setEnabled] = useState(userData?.monitoring || false); - const [loading, setLoading] = useState(false); - - const handleChange = async (e: ChangeEvent) => { - setLoading(true); - setEnabled(e.target.checked); - await setMonitoring(e.target.checked); - setLoading(false); - }; - - return ( - - - - - Turn on error reporting and performance monitoring - - - - } - label={enabled ? 'On' : 'Off'} - /> - - 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. - - - - - ); -}; diff --git a/nym-connect/desktop/src/pages/menu/reporting/UserFeedback.tsx b/nym-connect/desktop/src/pages/menu/reporting/UserFeedback.tsx deleted file mode 100644 index 67b37fcc5f..0000000000 --- a/nym-connect/desktop/src/pages/menu/reporting/UserFeedback.tsx +++ /dev/null @@ -1,124 +0,0 @@ -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/desktop/src/pages/menu/reporting/index.tsx b/nym-connect/desktop/src/pages/menu/reporting/index.tsx deleted file mode 100644 index ccc2c0bd1f..0000000000 --- a/nym-connect/desktop/src/pages/menu/reporting/index.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React from 'react'; -import { Link as RouterLink } from 'react-router-dom'; -import { Link, List, ListItem, ListItemButton, ListItemText, Stack } from '@mui/material'; -import { AppVersion } from 'src/components/AppVersion'; - -const menuSchema = [ - { title: 'Turn on error reporting', path: 'error-reporting' }, - { title: 'Send us your feedback', path: 'user-feedback' }, -]; - -export const ReportingMenu = () => ( - - - {menuSchema.map((item) => ( - - - - {item.title} - - - - ))} - - - -); diff --git a/nym-connect/desktop/src/pages/menu/settings/GatewaySettings.tsx b/nym-connect/desktop/src/pages/menu/settings/GatewaySettings.tsx deleted file mode 100644 index c4de721ef8..0000000000 --- a/nym-connect/desktop/src/pages/menu/settings/GatewaySettings.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import React, { ChangeEvent, useState } from 'react'; -import { IdentityKeyFormField } from '@nymproject/react/mixnodes/IdentityKeyFormField'; -import { Box, FormControl, FormControlLabel, FormHelperText, Link, 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?.address); - - const handleIsValidGatewayKey = (isValid: boolean) => { - let gateway: string | undefined; - - if (isValid) { - gateway = gatewayKey; - } - - setUserDefinedGateway((current) => ({ ...current, address: 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 the{' '} - - Network Explorer - - - - - - - ); -}; diff --git a/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx b/nym-connect/desktop/src/pages/menu/settings/ServiceProviderSettings.tsx deleted file mode 100644 index 0d0a0cdd20..0000000000 --- a/nym-connect/desktop/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/desktop/src/pages/menu/settings/index.tsx b/nym-connect/desktop/src/pages/menu/settings/index.tsx deleted file mode 100644 index bc58b69f1b..0000000000 --- a/nym-connect/desktop/src/pages/menu/settings/index.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import React from 'react'; -import { Link as RouterLink } from 'react-router-dom'; -import { Link, List, ListItem, ListItemButton, ListItemText, Stack } from '@mui/material'; -import { AppVersion } from 'src/components/AppVersion'; -import { toggleLogViewer } from 'src/utils'; - -const menuSchema = [ - { title: 'Select your gateway', path: 'gateway' }, - { title: 'Select a service provider', path: 'service-provider' }, -]; - -export const SettingsMenu = () => ( - - - {menuSchema.map((item) => ( - - - - {item.title} - - - - ))} - - - Logs - - - - - -); diff --git a/nym-connect/desktop/src/routes/index.tsx b/nym-connect/desktop/src/routes/index.tsx deleted file mode 100644 index 67bd471460..0000000000 --- a/nym-connect/desktop/src/routes/index.tsx +++ /dev/null @@ -1,45 +0,0 @@ -import React from 'react'; -import { Routes, Route } from 'react-router-dom'; -import * as Sentry from '@sentry/react'; -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'; -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); - -export const AppRoutes = () => { - const { userData } = useClientContext(); - - const RoutesContainer = userData?.monitoring ? SentryRoutes : Routes; - - return ( - - } /> - - } /> - } /> - } /> - } /> - - } /> - } /> - } /> - - - } /> - } /> - } /> - - - - ); -}; diff --git a/nym-connect/desktop/src/sentry.ts b/nym-connect/desktop/src/sentry.ts deleted file mode 100644 index 5127c5dc0c..0000000000 --- a/nym-connect/desktop/src/sentry.ts +++ /dev/null @@ -1,58 +0,0 @@ -import React from 'react'; -import { createRoutesFromChildren, matchRoutes, useLocation, useNavigationType } from 'react-router-dom'; -import { invoke } from '@tauri-apps/api'; -import * as Sentry from '@sentry/react'; -import { CaptureConsole } from '@sentry/integrations'; -import { getVersion } from '@tauri-apps/api/app'; - -const SENTRY_DSN = 'SENTRY_DSN_JS'; - -async function initSentry() { - console.log('⚠ performance monitoring and error reporting enabled'); - console.log('initializing sentry'); - - const dsn = await invoke('get_env', { variable: SENTRY_DSN }); - - if (!dsn) { - console.warn(`unable to initialize sentry, ${SENTRY_DSN} env var not set`); - return; - } - - Sentry.init({ - dsn, - integrations: [ - new Sentry.BrowserTracing({ - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: ['localhost'], - routingInstrumentation: Sentry.reactRouterV6Instrumentation( - React.useEffect, - useLocation, - useNavigationType, - createRoutesFromChildren, - matchRoutes, - ), - }), - new Sentry.Replay(), - // captures Console API calls - new CaptureConsole({ levels: ['error', 'warn'] }), - ], - - // TODO adjust this in the future, 100% is not recommended for production - tracesSampleRate: 1.0, - - // Capture Replay for 10% of all sessions, - // plus for 100% of sessions with an error - replaysSessionSampleRate: 0.1, - replaysOnErrorSampleRate: 1.0, - - environment: process.env.NODE_ENV, - }); - - getVersion().then((version) => { - Sentry.setTag('app_version', version); - }); - - Sentry.setUser({ id: 'nym', ip_address: undefined }); -} - -export default initSentry; diff --git a/nym-connect/desktop/src/stories/AppFlow.stories.tsx b/nym-connect/desktop/src/stories/AppFlow.stories.tsx deleted file mode 100644 index c88f32bae2..0000000000 --- a/nym-connect/desktop/src/stories/AppFlow.stories.tsx +++ /dev/null @@ -1,115 +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', - }, - ], - }, - ]; - 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/desktop/src/stories/AppWindowFrame.stories.tsx b/nym-connect/desktop/src/stories/AppWindowFrame.stories.tsx deleted file mode 100644 index e8fa9a8b6b..0000000000 --- a/nym-connect/desktop/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/desktop/src/stories/ConnectedLayout.stories.tsx b/nym-connect/desktop/src/stories/ConnectedLayout.stories.tsx deleted file mode 100644 index b0e72587c2..0000000000 --- a/nym-connect/desktop/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' }} - 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/desktop/src/stories/ConnectionButton.stories.tsx b/nym-connect/desktop/src/stories/ConnectionButton.stories.tsx deleted file mode 100644 index 6fcf7530ad..0000000000 --- a/nym-connect/desktop/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/desktop/src/stories/ConnectionStats.stories.tsx b/nym-connect/desktop/src/stories/ConnectionStats.stories.tsx deleted file mode 100644 index 7faea66c16..0000000000 --- a/nym-connect/desktop/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/desktop/src/stories/ConnectionStatus.stories.tsx b/nym-connect/desktop/src/stories/ConnectionStatus.stories.tsx deleted file mode 100644 index d98e262374..0000000000 --- a/nym-connect/desktop/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/desktop/src/stories/DefaultLayout.stories.tsx b/nym-connect/desktop/src/stories/DefaultLayout.stories.tsx deleted file mode 100644 index 00a2c5b684..0000000000 --- a/nym-connect/desktop/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/desktop/src/stories/Introduction.stories.mdx b/nym-connect/desktop/src/stories/Introduction.stories.mdx deleted file mode 100644 index eb1d51fc24..0000000000 --- a/nym-connect/desktop/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/desktop/src/stories/IpAddressAndPort.stories.tsx b/nym-connect/desktop/src/stories/IpAddressAndPort.stories.tsx deleted file mode 100644 index 943b3a40b4..0000000000 --- a/nym-connect/desktop/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/desktop/src/stories/PowerButton.stories.tsx b/nym-connect/desktop/src/stories/PowerButton.stories.tsx deleted file mode 100644 index 6cb2896849..0000000000 --- a/nym-connect/desktop/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/desktop/src/theme/index.tsx b/nym-connect/desktop/src/theme/index.tsx deleted file mode 100644 index d307fe46ee..0000000000 --- a/nym-connect/desktop/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/desktop/src/theme/mui-theme.d.ts b/nym-connect/desktop/src/theme/mui-theme.d.ts deleted file mode 100644 index 76db4b1a99..0000000000 --- a/nym-connect/desktop/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/desktop/src/theme/theme.tsx b/nym-connect/desktop/src/theme/theme.tsx deleted file mode 100644 index 977b0c9dfd..0000000000 --- a/nym-connect/desktop/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: 14, - 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/desktop/src/types/connection.ts b/nym-connect/desktop/src/types/connection.ts deleted file mode 100644 index 8fb5234477..0000000000 --- a/nym-connect/desktop/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/desktop/src/types/directory.ts b/nym-connect/desktop/src/types/directory.ts deleted file mode 100644 index 3883b5ce5c..0000000000 --- a/nym-connect/desktop/src/types/directory.ts +++ /dev/null @@ -1,17 +0,0 @@ -export interface ServiceProvider { - id: string; - description: string; - address: string; -} - -export interface Service { - id: string; - description: string; - items: ServiceProvider[]; -} - -export type Services = Service[]; - -export interface Gateway { - identity: string; -} diff --git a/nym-connect/desktop/src/types/error.ts b/nym-connect/desktop/src/types/error.ts deleted file mode 100644 index 599b959c39..0000000000 --- a/nym-connect/desktop/src/types/error.ts +++ /dev/null @@ -1,4 +0,0 @@ -export type Error = { - title: string; - message: string; -}; diff --git a/nym-connect/desktop/src/types/event.ts b/nym-connect/desktop/src/types/event.ts deleted file mode 100644 index 66d1e514a6..0000000000 --- a/nym-connect/desktop/src/types/event.ts +++ /dev/null @@ -1,6 +0,0 @@ -export type TauriEvent = { - payload: { - title: string; - message: string; - }; -}; diff --git a/nym-connect/desktop/src/types/index.ts b/nym-connect/desktop/src/types/index.ts deleted file mode 100644 index 7ebac88588..0000000000 --- a/nym-connect/desktop/src/types/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './rust'; -export * from './connection'; -export * from './user-data'; diff --git a/nym-connect/desktop/src/types/rust/index.ts b/nym-connect/desktop/src/types/rust/index.ts deleted file mode 100644 index f8efcfe235..0000000000 --- a/nym-connect/desktop/src/types/rust/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './stateparams'; diff --git a/nym-connect/desktop/src/types/rust/stateparams.ts b/nym-connect/desktop/src/types/rust/stateparams.ts deleted file mode 100644 index b7d7032420..0000000000 --- a/nym-connect/desktop/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/desktop/src/types/service-provider.ts b/nym-connect/desktop/src/types/service-provider.ts deleted file mode 100644 index 21cfee1174..0000000000 --- a/nym-connect/desktop/src/types/service-provider.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface UserDefinedGateway { - isActive: boolean; - address?: string; -} - -export interface UserDefinedSPAddress { - isActive: boolean; - address?: string; -} diff --git a/nym-connect/desktop/src/types/user-data.ts b/nym-connect/desktop/src/types/user-data.ts deleted file mode 100644 index db09b32b74..0000000000 --- a/nym-connect/desktop/src/types/user-data.ts +++ /dev/null @@ -1,18 +0,0 @@ -export type PrivacyLevel = 'High' | 'Medium'; - -export type SelectedGateway = { - address?: string; - is_active?: boolean; -}; - -export type SelectedSp = { - address?: string; - is_active?: boolean; -}; - -export type UserData = { - monitoring?: boolean; - privacy_level?: PrivacyLevel; - selected_gateway?: SelectedGateway; - selected_sp?: SelectedSp; -}; diff --git a/nym-connect/desktop/src/typings/FC.d.ts b/nym-connect/desktop/src/typings/FC.d.ts deleted file mode 100644 index 08ebdfa298..0000000000 --- a/nym-connect/desktop/src/typings/FC.d.ts +++ /dev/null @@ -1 +0,0 @@ -declare type FCWithChildren

= React.FC>; diff --git a/nym-connect/desktop/src/typings/jpeg.d.ts b/nym-connect/desktop/src/typings/jpeg.d.ts deleted file mode 100644 index af2ed72913..0000000000 --- a/nym-connect/desktop/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/desktop/src/typings/json.d.ts b/nym-connect/desktop/src/typings/json.d.ts deleted file mode 100644 index b72dd46ee5..0000000000 --- a/nym-connect/desktop/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/desktop/src/typings/png.d.ts b/nym-connect/desktop/src/typings/png.d.ts deleted file mode 100644 index dd84df40a4..0000000000 --- a/nym-connect/desktop/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/desktop/src/typings/svg.d.ts b/nym-connect/desktop/src/typings/svg.d.ts deleted file mode 100644 index 091d25e210..0000000000 --- a/nym-connect/desktop/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/desktop/src/typings/webp.d.ts b/nym-connect/desktop/src/typings/webp.d.ts deleted file mode 100644 index d594a17f53..0000000000 --- a/nym-connect/desktop/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/desktop/src/typings/yaml.d.ts b/nym-connect/desktop/src/typings/yaml.d.ts deleted file mode 100644 index 4c36d21ec0..0000000000 --- a/nym-connect/desktop/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/desktop/src/utils/index.ts b/nym-connect/desktop/src/utils/index.ts deleted file mode 100644 index 40aba86f80..0000000000 --- a/nym-connect/desktop/src/utils/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { invoke } from '@tauri-apps/api'; - -export const toggleLogViewer = async () => { - await invoke('help_log_toggle_window'); -}; diff --git a/nym-connect/desktop/tsconfig.eslint.json b/nym-connect/desktop/tsconfig.eslint.json deleted file mode 100644 index 836be28a14..0000000000 --- a/nym-connect/desktop/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/desktop/tsconfig.json b/nym-connect/desktop/tsconfig.json deleted file mode 100644 index 5ac8a1b33e..0000000000 --- a/nym-connect/desktop/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"] -} diff --git a/nym-connect/desktop/webpack.common.js b/nym-connect/desktop/webpack.common.js deleted file mode 100644 index dfd23f7c96..0000000000 --- a/nym-connect/desktop/webpack.common.js +++ /dev/null @@ -1,57 +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'), - log: path.resolve(__dirname, 'src/log.tsx'), -}; - -module.exports = mergeWithRules({ - module: { - rules: { - test: 'match', - use: 'replace', - }, - }, -})( - webpackCommon(__dirname, [ - { filename: 'index.html', chunks: ['app'], template: path.resolve(__dirname, 'public/index.html') }, - { filename: 'log.html', chunks: ['log'], template: path.resolve(__dirname, 'public/log.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/desktop/webpack.dev.js b/nym-connect/desktop/webpack.dev.js deleted file mode 100644 index d44c28ca69..0000000000 --- a/nym-connect/desktop/webpack.dev.js +++ /dev/null @@ -1,66 +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'); - -module.exports = 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, - hot: true, - client: { - overlay: false, - }, - }, -}); diff --git a/nym-connect/desktop/webpack.prod.js b/nym-connect/desktop/webpack.prod.js deleted file mode 100644 index cb3789f7a6..0000000000 --- a/nym-connect/desktop/webpack.prod.js +++ /dev/null @@ -1,16 +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'), - log: path.resolve(__dirname, 'src/log.tsx'), -}; - -module.exports = merge(common, { - mode: 'production', - node: { - __dirname: false, - }, - entry, -}); diff --git a/nym-connect/native/android/.gitignore b/nym-connect/native/android/.gitignore deleted file mode 100644 index aa724b7707..0000000000 --- a/nym-connect/native/android/.gitignore +++ /dev/null @@ -1,15 +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 diff --git a/nym-connect/native/android/README.md b/nym-connect/native/android/README.md deleted file mode 100644 index c0092aedd5..0000000000 --- a/nym-connect/native/android/README.md +++ /dev/null @@ -1,71 +0,0 @@ -## Nym Connect for Android - -### Prerequisites - -_TODO_ - -### Getting started - -[Install](https://developer.android.com/studio/install) Android Studio and open -the project.\ -Setup an android emulator using AVD.\ -[Run](https://developer.android.com/studio/run/emulator) the project. - -**⚠ NOTE**: be sure -to [set](https://developer.android.com/studio/run#changing-variant) -the build variant to `x86_64Debug` when running on emulator - -### Lib Nym socks5 - -This Application needs the -native [nym-socks5-listener](https://github.com/nymtech/nym/blob/develop/sdk/lib/socks5-listener/Cargo.toml) -library in order to work. - -To build it for x86_64 and arm64 arch, from the root of the repo run - -```shell -cd sdk/lib/socks5-listener/ -./build-android.sh aarch64 x86_64 -``` - -To build in release mode run - -```shell -RELEASE=true ./build-android.sh aarch64 x86_64 -``` - -The shared library for each ABIs will be automatically moved into -`app/src/main/jniLibs/*` directories. - -### APK/AAB build (from terminal) - -This project is setup with multiple [product flavors](app/build.gradle) to -build for specific architectures.\ -Supported archs: - -- arm64 -- arm (old arm) -- x86_64 -- x86 - -For example to build an APK for _arm64_ in _release_ mode use - -```shell -./gradlew :app:assembleArm64Release -``` - -Instead of building an APK, to build an app bundle (`.aab`) run - -```shell -./gradlew :app:bundleArm64Release -``` - -**NOTE**: you likely want _arch64_ (`arm64` & `x86_64`) for APK distribution - -To build a _universal_ APK which includes all ABI use - -```shell -./gradlew :app:assembleUniversalRelease -``` - -**⚠ WARNING**: APK size will be multiplied diff --git a/nym-connect/native/android/app/.gitignore b/nym-connect/native/android/app/.gitignore deleted file mode 100644 index 42afabfd2a..0000000000 --- a/nym-connect/native/android/app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build \ No newline at end of file diff --git a/nym-connect/native/android/app/build.gradle.kts b/nym-connect/native/android/app/build.gradle.kts deleted file mode 100644 index a93507b8a9..0000000000 --- a/nym-connect/native/android/app/build.gradle.kts +++ /dev/null @@ -1,149 +0,0 @@ -plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") - id("org.jetbrains.kotlin.plugin.serialization") version "1.8.21" - id("io.sentry.android.gradle") version "3.11.0" -} - -android { - namespace = "net.nymtech.nyms5" - compileSdk = 34 - - defaultConfig { - applicationId = "net.nymtech.nyms5" - minSdk = 24 - targetSdk = 34 - versionCode = 1 - versionName = "1.0" - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables { - useSupportLibrary = true - } - } - - bundle { - language { - enableSplit = true - } - density { - enableSplit = true - } - abi { - enableSplit = true - } - } - - buildTypes { - release { - isMinifyEnabled = true - proguardFiles( - getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" - ) - } - } - - flavorDimensions += "abi" - productFlavors { - create("universal") { - dimension = "abi" - ndk { - abiFilters += listOf("arm64-v8a", "armeabi-v7a", "x86_64", "x86") - } - } - create("arch64") { - dimension = "abi" - ndk { - abiFilters += listOf("arm64-v8a", "x86_64") - } - } - create("arm64") { - dimension = "abi" - ndk { - abiFilters += "arm64-v8a" - } - } - create("arm") { - dimension = "abi" - ndk { - abiFilters += "armeabi-v7a" - } - } - create("x86_64") { - dimension = "abi" - ndk { - abiFilters += "x86_64" - } - } - create("x86") { - dimension = "abi" - ndk { - abiFilters += "x86" - } - } - } - -// splits { -// abi { -// enable true -// reset() -// include "x86_64", "arm64-v8a" -// universalApk true -// } -// } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = "1.8" - } - buildFeatures { - compose = true - } - composeOptions { - kotlinCompilerExtensionVersion = "1.4.6" - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } -} - -sentry { - // TODO disable auto upload of mapping files for now to ease FDroid submission - // (avoiding to have to provide a sentry auth token during compile time) - autoUploadProguardMapping.set(false) -} - -dependencies { - - implementation("androidx.core:core-ktx:1.10.1") - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1") - implementation("androidx.activity:activity-compose:1.7.2") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4") - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0") - implementation(platform("androidx.compose:compose-bom:2022.10.00")) - implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1") - implementation("androidx.navigation:navigation-compose:2.6.0") - implementation("androidx.compose.runtime:runtime-livedata") - implementation("androidx.compose.ui:ui") - implementation("androidx.compose.ui:ui-graphics") - implementation("androidx.compose.ui:ui-tooling-preview") - implementation("androidx.compose.material3:material3") - implementation("androidx.work:work-runtime-ktx:2.8.1") - implementation("androidx.datastore:datastore-preferences:1.0.0") - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.3") - androidTestImplementation("androidx.test.espresso:espresso-core:3.4.0") - androidTestImplementation(platform("androidx.compose:compose-bom:2022.10.00")) - androidTestImplementation("androidx.compose.ui:ui-test-junit4") - debugImplementation("androidx.compose.ui:ui-tooling") - debugImplementation("androidx.compose.ui:ui-test-manifest") - implementation("com.github.kittinunf.fuel:fuel:2.3.1") - implementation("io.sentry:sentry-android:6.24.0") -} diff --git a/nym-connect/native/android/app/proguard-rules.pro b/nym-connect/native/android/app/proguard-rules.pro deleted file mode 100644 index 481bb43481..0000000000 --- a/nym-connect/native/android/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/native/android/app/src/androidTest/java/net/nymtech/nyms5/ExampleInstrumentedTest.kt b/nym-connect/native/android/app/src/androidTest/java/net/nymtech/nyms5/ExampleInstrumentedTest.kt deleted file mode 100644 index 03593bfec4..0000000000 --- a/nym-connect/native/android/app/src/androidTest/java/net/nymtech/nyms5/ExampleInstrumentedTest.kt +++ /dev/null @@ -1,24 +0,0 @@ -package net.nymtech.nyms5 - -import androidx.test.platform.app.InstrumentationRegistry -import androidx.test.ext.junit.runners.AndroidJUnit4 - -import org.junit.Test -import org.junit.runner.RunWith - -import org.junit.Assert.* - -/** - * Instrumented test, which will execute on an Android device. - * - * See [testing documentation](http://d.android.com/tools/testing). - */ -@RunWith(AndroidJUnit4::class) -class ExampleInstrumentedTest { - @Test - fun useAppContext() { - // Context of the app under test. - val appContext = InstrumentationRegistry.getInstrumentation().targetContext - assertEquals("net.nymtech.nyms5", appContext.packageName) - } -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/AndroidManifest.xml b/nym-connect/native/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index d013b90324..0000000000 --- a/nym-connect/native/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/App.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/App.kt deleted file mode 100644 index 6da2011ffc..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/App.kt +++ /dev/null @@ -1,88 +0,0 @@ -package net.nymtech.nyms5 - -import android.app.Application -import android.content.Context -import android.content.pm.PackageManager -import android.os.Build -import android.util.Log -import androidx.datastore.core.DataStore -import androidx.datastore.preferences.core.Preferences -import androidx.datastore.preferences.core.booleanPreferencesKey -import androidx.datastore.preferences.preferencesDataStore -import androidx.work.Configuration -import androidx.work.DelegatingWorkerFactory -import io.sentry.Scope -import io.sentry.Sentry -import io.sentry.android.core.SentryAndroid -import io.sentry.protocol.User -import kotlinx.coroutines.flow.first -import kotlinx.coroutines.flow.map -import kotlinx.coroutines.runBlocking - -val Context.dataStore: DataStore by preferencesDataStore(name = "settings") -val monitoringKey = booleanPreferencesKey("monitoring") - -class App : Application(), Configuration.Provider { - companion object { - // NymProxy singleton (unique instance) - val nymProxy = NymProxy() - } - - private val tag = "App" - - override fun onCreate() { - super.onCreate() - val app = this - - runBlocking { - val monitoring = applicationContext.dataStore.data.map { preferences -> - preferences[monitoringKey] ?: false - }.first() - - if (monitoring) { - Log.i(tag, "Performance monitoring and error reporting enabled") - SentryAndroid.init(app) { options -> - options.dsn = - "https://6872f5818bc147ef9c0fce114fcaac8a@o967446.ingest.sentry.io/4505306218102784" - options.enableAllAutoBreadcrumbs(true) - options.isEnableUserInteractionTracing = true - options.isEnableUserInteractionBreadcrumbs = true - - // TODO should be adjusted in production env - options.sampleRate = 1.0 - options.tracesSampleRate = 1.0 - options.profilesSampleRate = 1.0 - } - - Sentry.configureScope { scope: Scope -> - val packageManager = applicationContext.packageManager - val packageInfo = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - packageManager.getPackageInfo( - packageName, - PackageManager.PackageInfoFlags.of(0) - ) - } else { - packageManager.getPackageInfo(packageName, 0) - } - scope.setTag("app_version", packageInfo.versionName) - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - scope.setTag("app_version_code", packageInfo.longVersionCode.toString()) - } - } - - val user = User() - user.id = "nym" - Sentry.setUser(user) - } - } - } - - override fun getWorkManagerConfiguration(): Configuration { - val workerFactory = DelegatingWorkerFactory() - // pass in the NymProxy class instance - workerFactory.addFactory(CustomWorkerFactory(nymProxy)) - - Log.d(tag, "using a custom configuration for WorkManager") - return Configuration.Builder().setWorkerFactory(workerFactory).build() - } -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/CustomWorkerFactory.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/CustomWorkerFactory.kt deleted file mode 100644 index 61d0683457..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/CustomWorkerFactory.kt +++ /dev/null @@ -1,26 +0,0 @@ -package net.nymtech.nyms5 - -import android.content.Context -import androidx.work.ListenableWorker -import androidx.work.WorkerFactory -import androidx.work.WorkerParameters - -class CustomWorkerFactory(private val nymProxy: NymProxy) : WorkerFactory() { - - override fun createWorker( - appContext: Context, - workerClassName: String, - workerParameters: WorkerParameters - ): ListenableWorker? { - - return when (workerClassName) { - ProxyWorker::class.java.name -> - ProxyWorker(appContext, workerParameters, nymProxy) - - else -> - // Return null, so that the base class can delegate to the default WorkerFactory. - null - } - - } -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/MainActivity.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/MainActivity.kt deleted file mode 100644 index 40cfb459c6..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/MainActivity.kt +++ /dev/null @@ -1,151 +0,0 @@ -package net.nymtech.nyms5 - -import android.Manifest.permission.POST_NOTIFICATIONS -import android.content.pm.PackageManager -import android.os.Build -import android.os.Bundle -import android.util.Log -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.activity.result.contract.ActivityResultContracts -import androidx.activity.viewModels -import androidx.lifecycle.Lifecycle -import androidx.lifecycle.lifecycleScope -import androidx.lifecycle.repeatOnLifecycle -import kotlinx.coroutines.launch -import net.nymtech.nyms5.ui.theme.NymTheme -import androidx.work.WorkInfo -import androidx.work.WorkManager -import kotlinx.coroutines.DelicateCoroutinesApi -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.GlobalScope -import kotlinx.coroutines.flow.map -import net.nymtech.nyms5.ui.composables.HomeScreen - -@OptIn(DelicateCoroutinesApi::class) -class MainActivity : ComponentActivity() { - private val tag = "MainActivity" - private val nymProxy = App.nymProxy - - private val viewModel: MainViewModel by viewModels { - MainViewModelFactory( - workManager = WorkManager.getInstance(applicationContext), - nymProxy = App.nymProxy - ) - } - - private val requestPermissionLauncher = - registerForActivityResult( - ActivityResultContracts.RequestPermission() - ) { isGranted: Boolean -> - if (isGranted) { - Log.d(tag, "permission POST_NOTIFICATIONS has been granted") - } else { - Log.d(tag, "permission POST_NOTIFICATIONS has NOT been granted") - } - } - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - Log.d(tag, "____onCreate") - Log.i(tag, "device SDK [${Build.VERSION.SDK_INT}]") - - val workManager = WorkManager.getInstance(applicationContext) - - checkPermission() - - // observe proxy work progress - workManager.getWorkInfoByIdLiveData(ProxyWorker.workId) - // this observer is tied to the activity lifecycle - .observe(this) { workInfo -> - lifecycleScope.launch(Dispatchers.IO) { - val proxyState = App.nymProxy.getState() - val workState = workInfo.state - val workProgress = workInfo.progress.getString(ProxyWorker.State) - Log.i( - tag, - "proxy state: $proxyState, work state: $workState, work progress: $workProgress" - ) - if (proxyState == NymProxy.Companion.State.CONNECTED && - workState == WorkInfo.State.RUNNING - ) { - viewModel.setUiConnected() - } - } - } - - // The work can be cancelled by the user from the dedicated notification - // by tapping the "Stop" action. When that happens the underlying proxy - // process keeps running in the background - // We have to manually call `stopClient` to kill it - workManager.getWorkInfoByIdLiveData(ProxyWorker.workId) - // watch "forever", ie. even when this viewModel has been cleared - .observeForever { workInfo -> - if (workInfo?.state == WorkInfo.State.CANCELLED || workInfo?.state == WorkInfo.State.FAILED) { - // ⚠ here one could be tempted to call `viewModel.cancelProxyWork` - // but it uses viewModelScope which is cancelled when - // the app goes to background so use `GlobalScope` instead - GlobalScope.launch(Dispatchers.IO) { - // if the proxy process is still running kill it - if (nymProxy.getState() == NymProxy.Companion.State.CONNECTED) { - Log.i(tag, "⚠ work has been cancelled") - nymProxy.stop() - } - } - // update the UI - viewModel.setUiDisconnected() - } - } - - lifecycleScope.launch { - repeatOnLifecycle(Lifecycle.State.STARTED) { - Log.d(tag, "____UI recompose") - applicationContext.dataStore.data.map { preferences -> - preferences[monitoringKey] ?: false - }.collect { monitoring -> - viewModel.uiState.collect { - setContent { - NymTheme { - val loading = it.loading - - HomeScreen(it, monitoring, applicationContext.dataStore) { - if (!loading) { - when { - it -> { - Log.d(tag, "switch ON") - viewModel.startProxyWork() - } - - else -> { - Log.d(tag, "switch OFF") - viewModel.cancelProxyWork() - } - } - } - } - } - } - } - } - } - } - } - - private fun checkPermission() { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - // POST_NOTIFICATIONS is needed for the notification displayed - // when socks5 proxy client is running - when (checkSelfPermission(POST_NOTIFICATIONS)) { - PackageManager.PERMISSION_GRANTED -> { - Log.d(tag, "check permission POST_NOTIFICATIONS: granted") - } - - else -> { - Log.d(tag, "check permission POST_NOTIFICATIONS: not granted") - requestPermissionLauncher.launch(POST_NOTIFICATIONS) - } - } - } - } -} - diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/MainViewModel.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/MainViewModel.kt deleted file mode 100644 index 56591a6904..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/MainViewModel.kt +++ /dev/null @@ -1,119 +0,0 @@ -package net.nymtech.nyms5 - -import android.util.Log -import androidx.lifecycle.ViewModel -import androidx.lifecycle.ViewModelProvider -import androidx.lifecycle.viewModelScope -import androidx.work.Constraints -import androidx.work.ExistingWorkPolicy -import androidx.work.NetworkType -import androidx.work.OneTimeWorkRequest -import androidx.work.OneTimeWorkRequestBuilder -import androidx.work.OutOfQuotaPolicy -import androidx.work.WorkManager -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.delay -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.flow.update -import kotlinx.coroutines.launch - -class MainViewModel( - private val workManager: WorkManager, - private val nymProxy: NymProxy -) : ViewModel() { - private val tag = "MainViewModel" - - private val workRequest: OneTimeWorkRequest = - OneTimeWorkRequestBuilder() - .setConstraints( - Constraints.Builder() - .setRequiredNetworkType(NetworkType.CONNECTED).build() - ) - .setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST) - .addTag(ProxyWorker.workTag) - .setId(ProxyWorker.workId) - .build() - - - - data class ProxyState( - val connected: Boolean = false, - val loading: Boolean = false - ) - - // Expose screen UI state - private val _uiState = MutableStateFlow(ProxyState()) - val uiState: StateFlow = _uiState.asStateFlow() - - fun setUiConnected() { - Log.d(tag, "____setUiConnected") - _uiState.update { currentState -> - currentState.copy( - connected = true, - loading = false, - ) - } - } - - fun setUiDisconnected() { - Log.d(tag, "____setUiDisconnected") - _uiState.update { currentState -> - currentState.copy( - connected = false, - loading = false, - ) - } - } - - fun startProxyWork() { - // start loading state - _uiState.update { currentState -> - currentState.copy( - connected = true, - loading = true, - ) - } - - // start long-running proxy service - workManager.enqueueUniqueWork( - ProxyWorker.name, - ExistingWorkPolicy.REPLACE, - workRequest - ) - } - - fun cancelProxyWork() { - // update state - _uiState.update { currentState -> - currentState.copy( - connected = false, - loading = true, - ) - } - viewModelScope.launch(Dispatchers.IO) { - nymProxy.stop() - // TODO instead of delaying an arbitrary amount of time here, - // rely on lib callback for the shutdown connection state - // wait a bit to be sure the proxy client has enough time to - // close connection - delay(2000) - setUiDisconnected() - } - } -} - -class MainViewModelFactory( - private val workManager: WorkManager, - private val nymProxy: NymProxy -) : - ViewModelProvider.Factory { - override fun create(modelClass: Class): T { - return if (modelClass.isAssignableFrom(MainViewModel::class.java)) { - MainViewModel(workManager, nymProxy) as T - } else { - throw IllegalArgumentException("Unknown ViewModel class") - } - } -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/NymProxy.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/NymProxy.kt deleted file mode 100644 index 7c2f169c12..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/NymProxy.kt +++ /dev/null @@ -1,83 +0,0 @@ -package net.nymtech.nyms5 - -import android.util.Log -import io.sentry.Sentry - -const val nymNativeLib = "nym_socks5_listener" - -class NymProxy { - private val tag = "NymProxy" - - companion object { - enum class State { - UNINITIALIZED, - CONNECTED, - DISCONNECTED - } - } - - // Load the native library "libnym_socks5_listener.so" - init { - System.loadLibrary(nymNativeLib) - Log.i(tag, "loaded native library $nymNativeLib") - } - - // this is a blocking call as `startClient` is blocking and will releases when - // the socks5 connection has been terminated - fun start(serviceProvider: String, onStartCbObj: Any, onStopCbObj: Any) { - Log.d(tag, "calling $nymNativeLib:startClient") - try { - startClient(serviceProvider, onStartCbObj, onStopCbObj) - } catch (e: Throwable) { - Log.e(tag, "$nymNativeLib:startClient internal error: $e") - Sentry.captureException(e) - } - } - - fun stop() { - Log.d(tag, "calling $nymNativeLib:stopClient") - try { - stopClient() - } catch (e: Throwable) { - Log.e(tag, "$nymNativeLib:stopClient internal error: $e") - Sentry.captureException(e) - } - } - - fun ping(): Boolean { - Log.d(tag, "calling $nymNativeLib:pingClient") - try { - return pingClient() - } catch (e: Throwable) { - Log.e(tag, "$nymNativeLib:pingClient internal error: $e") - Sentry.captureException(e) - } - return false - } - - fun getState(): State { - Log.d(tag, "calling $nymNativeLib:getClientState") - try { - return when (getClientState()) { - 0 -> State.UNINITIALIZED - 1 -> State.CONNECTED - 2 -> State.DISCONNECTED - else -> throw Error("unknown state") - } - } catch (e: Throwable) { - Log.e(tag, "$nymNativeLib:getClientState internal error: $e") - Sentry.captureException(e) - } - return State.UNINITIALIZED - } - - private external fun startClient( - spAddress: String, - onStartCbObj: Any, - onStopCbObj: Any - ) - - private external fun stopClient() - private external fun getClientState(): Int - private external fun pingClient(): Boolean -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ProxyWorker.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ProxyWorker.kt deleted file mode 100644 index e2f9b8b02b..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ProxyWorker.kt +++ /dev/null @@ -1,251 +0,0 @@ -package net.nymtech.nyms5 - -import android.app.Notification -import android.app.NotificationChannel -import android.app.NotificationManager -import android.app.PendingIntent -import android.content.Context -import android.content.Intent -import android.os.Build -import android.util.Log -import androidx.annotation.RequiresApi -import androidx.core.app.NotificationCompat -import androidx.work.CoroutineWorker -import androidx.work.ForegroundInfo -import androidx.work.WorkManager -import androidx.work.WorkerParameters -import androidx.work.workDataOf -import com.github.kittinunf.fuel.Fuel -import io.sentry.Sentry -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.delay -import kotlinx.coroutines.launch -import kotlinx.coroutines.withContext -import kotlinx.serialization.Serializable -import kotlinx.serialization.decodeFromString -import kotlinx.serialization.json.Json -import java.util.UUID -import kotlin.random.Random - -class ProxyWorker( - context: Context, - parameters: WorkerParameters, - private val nymProxy: NymProxy -) : - CoroutineWorker(context, parameters) { - companion object Work { - const val name = "nymS5ProxyWorker" - const val workTag = "nymProxy" - // it is very important to use a static UUID in order to allow WorkManager - // handling the proxy work as a unique work - val workId: UUID = UUID.fromString("cc785aa4-5775-4bf0-b870-39645e35e660") - - const val State = "State" - - enum class Status { - DISCONNECTED, - STARTING, - CONNECTED - } - } - - private val tag = "proxyWorker" - - private val pingRate = 1000L - - private val spUrl = context.getString(R.string.sp_url) - - private val defaultSp = context.getString(R.string.default_sp) - - private val channelId = - applicationContext.getString(R.string.notification_channel_id) - - private val notificationId = 2001 - - private val notificationManager = - context.getSystemService(Context.NOTIFICATION_SERVICE) as - NotificationManager - - @Serializable - data class SPData( - val service_provider_client_id: String, - val gateway_identity_key: String, - val routing_score: Float, - val ip_address: String - ) - - @Serializable - data class SPListData(val items: List) - - private val json = Json { ignoreUnknownKeys = true } - - private val onStartCb = object { - fun onStart() { - Log.d(tag, "⚡ ON START callback") - setProgressAsync(workDataOf(State to Status.CONNECTED.name)) - } - } - - private val onStopCb = object { - fun onStop() { - Log.d(tag, "⚡ ON STOP callback") - setProgressAsync(workDataOf(State to Status.DISCONNECTED.name)) - } - } - - @RequiresApi(Build.VERSION_CODES.O) - override suspend fun doWork(): Result { - setProgress(workDataOf(State to Status.STARTING.name)) - - // set this work as a long running worker - // see https://developer.android.com/guide/background/persistent/how-to/long-running - // `setForeground` can fail - // see https://developer.android.com/guide/background/persistent/getting-started/define-work#coroutineworker - try { - setForeground(createForegroundInfo()) - } catch (e: Throwable) { - Log.w( - tag, - "failed to make the work run in the context of a foreground service" - ) - Sentry.captureException(e) - } - - return try { - Log.d(tag, "starting work") - - var serviceProvider: String? = null - // fetch the SP list and select a random one - try { - val (_, response, result) = Fuel.get(spUrl).responseString() - result.fold( - { data -> - val spJson = json.decodeFromString(data) - serviceProvider = - Random.nextInt(until = spJson.items.size) - .let { spJson.items[it].service_provider_client_id } - Log.d(tag, "selected service provider: $serviceProvider") - }, - { error -> - Log.w( - tag, - "failed to fetch the service provider list: ${response.statusCode} ${error.message}" - ) - Log.w(tag, "using a default service provider $defaultSp") - } - ) - } catch (e: Throwable) { - Log.e( - tag, - "an error occurred while fetching the service providers list: $e" - ) - Sentry.captureException(e) - Log.w(tag, "using a default service provider $defaultSp") - } - - withContext(Dispatchers.IO) { - val pingJob = launch { - // this job will get automatically killed by the WorkManager once - // the job has been terminated, so it's safe to use `while (true)` - while (true) { - nymProxy.ping() - delay(pingRate) - } - } - - val proxyJob = launch { - nymProxy.start(serviceProvider ?: defaultSp, onStartCb, onStopCb) - } - - // wait for the underlying call to `startClient` to be released which means - // the connection has been terminated (`startClient` is a blocking call) - proxyJob.join() - // stop pinging - pingJob.cancel() - } - - // the state should be already set to DISCONNECTED at this point - // but for the sake of it, reset it - setProgress(workDataOf(State to Status.DISCONNECTED.name)) - Log.i(tag, "work finished") - Result.success() - } catch (e: Throwable) { - Log.e(tag, "error: ${e.message}") - Sentry.captureException(e) - Result.failure() - } - } - - private fun createNotification(): Notification { - val title = applicationContext.getString(R.string.notification_title) - val cancel = applicationContext.getString(R.string.notification_action_stop) - val content = applicationContext.getString(R.string.notification_content) - // this pending intent is used to cancel the worker - // TODO instead of using this intent to cancel the work - // use a custom intent to call `nymProxy.stopClient` - val stopPendingIntent = WorkManager.getInstance(applicationContext) - .createCancelPendingIntent(id) - - // this intent is used for the notification's tap action - // on tap → show to the main activity - val tapIntent = - Intent(applicationContext, MainActivity::class.java).apply { - flags = - Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT - } - val tapPendingIntent: PendingIntent = PendingIntent.getActivity( - applicationContext, - 0, - tapIntent, - PendingIntent.FLAG_IMMUTABLE - ) - - return NotificationCompat.Builder(applicationContext, channelId) - .setContentTitle(title) - .setContentText(content) - .setSmallIcon(R.drawable.shield_24) - .setOngoing(true) - .setContentIntent(tapPendingIntent) - .addAction(android.R.drawable.ic_delete, cancel, stopPendingIntent) - .build() - } - - // Creates an instance of ForegroundInfo which can be used to update the - // ongoing notification. - @RequiresApi(Build.VERSION_CODES.O) - private fun createForegroundInfo(): ForegroundInfo { - Log.d(tag, "__createForegroundInfo") - - // Create a Notification channel if necessary - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createChannel() - } - - return ForegroundInfo(notificationId, createNotification()) - } - - // TODO without this override, under Android 11 the app crashes - // see https://developer.android.com/guide/background/persistent/getting-started/define-work#coroutineworker - // override doesn't seem to be a problem for newer versions - override suspend fun getForegroundInfo(): ForegroundInfo { - Log.d(tag, "__getForegroundInfo") - - // Create a Notification channel if necessary - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createChannel() - } - return ForegroundInfo(notificationId, createNotification()) - } - - @RequiresApi(Build.VERSION_CODES.O) - private fun createChannel() { - Log.d(tag, "creating notification channel") - notificationManager.createNotificationChannel( - NotificationChannel( - channelId, - applicationContext.getString(R.string.notification_channel_name), - NotificationManager.IMPORTANCE_DEFAULT - ) - ) - } -} diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/HomeScreen.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/HomeScreen.kt deleted file mode 100644 index 898c7613fe..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/HomeScreen.kt +++ /dev/null @@ -1,113 +0,0 @@ -package net.nymtech.nyms5.ui.composables - -import androidx.compose.foundation.layout.padding -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.ArrowBack -import androidx.compose.material.icons.filled.Menu -import androidx.compose.material3.CenterAlignedTopAppBar -import androidx.compose.material3.DropdownMenu -import androidx.compose.material3.DropdownMenuItem -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.runtime.setValue -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource -import androidx.datastore.core.DataStore -import androidx.datastore.preferences.core.Preferences -import androidx.datastore.preferences.core.edit -import androidx.navigation.compose.NavHost -import androidx.navigation.compose.composable -import androidx.navigation.compose.currentBackStackEntryAsState -import androidx.navigation.compose.rememberNavController -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch -import net.nymtech.nyms5.MainViewModel -import net.nymtech.nyms5.R -import net.nymtech.nyms5.monitoringKey - -@OptIn(ExperimentalMaterial3Api::class) -@Composable -fun HomeScreen( - proxyState: MainViewModel.ProxyState, - monitoring: Boolean, - dataStore: DataStore, - onSwitch: (value: Boolean) -> Unit, -) { - val navController = rememberNavController() - var expanded by remember { mutableStateOf(false) } - val scope = rememberCoroutineScope() - - Scaffold(topBar = { - CenterAlignedTopAppBar( - title = { - Text(stringResource(R.string.app_name)) - }, - navigationIcon = { - val navBackStackEntry by navController.currentBackStackEntryAsState() - val currentRoute = navBackStackEntry?.destination?.route - - if (currentRoute === "proxy") { - IconButton(onClick = { expanded = true }) { - Icon( - imageVector = Icons.Filled.Menu, - contentDescription = "Main menu" - ) - } - DropdownMenu( - expanded = expanded, - onDismissRequest = { expanded = false } - ) { - DropdownMenuItem(onClick = { - navController.navigate("monitoring") { - popUpTo("proxy") - } - expanded = false - }, text = { - Text("Error reporting") - }) - } - } else { - IconButton(onClick = { - navController.navigate("proxy") { - popUpTo("proxy") - } - }) { - Icon( - imageVector = Icons.Filled.ArrowBack, - contentDescription = "Back home" - ) - } - } - }, - ) - }) { contentPadding -> - NavHost( - navController = navController, - startDestination = "proxy", - modifier = Modifier.padding(contentPadding) - ) { - composable("proxy") { - S5ClientSwitch( - connected = proxyState.connected, - loading = proxyState.loading, - onSwitch = onSwitch - ) - } - composable("monitoring") { - Monitoring(initialValue = monitoring) { - scope.launch(Dispatchers.IO) { - dataStore.edit { settings -> settings[monitoringKey] = it } - } - } - } - } - } -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/Monitoring.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/Monitoring.kt deleted file mode 100644 index 4195647891..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/Monitoring.kt +++ /dev/null @@ -1,93 +0,0 @@ -package net.nymtech.nyms5.ui.composables - -import android.util.Log -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Switch -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.remember -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import net.nymtech.nyms5.R -import net.nymtech.nyms5.ui.theme.NymTheme -import net.nymtech.nyms5.ui.theme.darkYellow -import net.nymtech.nyms5.ui.theme.lightYellow - -@Composable -fun Monitoring( - modifier: Modifier = Modifier, - initialValue: Boolean, - onSwitch: (value: Boolean) -> Unit, -) { - var monitoring by remember { mutableStateOf(initialValue) } - val yellowColor = when (isSystemInDarkTheme()) { - true -> darkYellow - false -> lightYellow - } - - Column( - modifier = modifier - .padding(16.dp) - .verticalScroll(rememberScrollState()) - ) { - Row( - verticalAlignment = Alignment.CenterVertically - ) { - Text("Enable error reporting") - Spacer(modifier = modifier.width(16.dp)) - Switch(checked = monitoring, onCheckedChange = { - monitoring = it - onSwitch(it) - }) - } - Spacer(modifier = modifier.height(18.dp)) - Row(verticalAlignment = Alignment.CenterVertically) { - Icon( - painter = painterResource(R.drawable.warning_24), - contentDescription = "copy to clipboard", - tint = yellowColor - ) - Spacer(modifier = modifier.width(16.dp)) - Text( - stringResource(R.string.monitoring_desc_2), - color = yellowColor - ) - } - Spacer(modifier = modifier.height(18.dp)) - Text(stringResource(R.string.monitoring_desc_1)) - } -} - -@Preview -@Composable -fun PreviewMonitoring() { - NymTheme { - Surface( - modifier = Modifier.fillMaxSize(), - color = MaterialTheme.colorScheme.background - ) { - Monitoring(initialValue = false) { - Log.d("Monitoring", "switch $it") - } - } - } -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/S5ClientSwitch.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/S5ClientSwitch.kt deleted file mode 100644 index 3361e6fc8a..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/composables/S5ClientSwitch.kt +++ /dev/null @@ -1,142 +0,0 @@ -package net.nymtech.nyms5.ui.composables - -import android.util.Log -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.width -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.material3.ExperimentalMaterial3Api -import androidx.compose.material3.Icon -import androidx.compose.material3.LinearProgressIndicator -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.material3.Switch -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.saveable.rememberSaveable -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.platform.LocalClipboardManager -import androidx.compose.ui.platform.testTag -import androidx.compose.ui.res.painterResource -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.AnnotatedString -import androidx.compose.ui.text.font.FontStyle -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import net.nymtech.nyms5.R -import net.nymtech.nyms5.ui.theme.NymTheme - -@OptIn(ExperimentalMaterial3Api::class) -@Composable -fun S5ClientSwitch( - connected: Boolean, - loading: Boolean, - onSwitch: (value: Boolean) -> Unit, - modifier: Modifier = Modifier -) { - val clipboardManager = LocalClipboardManager.current - val host = stringResource(R.string.proxy_host) - val port = stringResource(R.string.proxy_port) - if (loading) { - Row { - LinearProgressIndicator( - modifier = modifier.fillMaxWidth(), - color = MaterialTheme.colorScheme.secondary - ) - } - } else { - Spacer(modifier = modifier.height(2.dp)) - } - Column(modifier = modifier.padding(16.dp)) { - Row( - modifier = modifier.padding(16.dp), - verticalAlignment = Alignment.CenterVertically - ) { - Text("Nym proxy") - Spacer(modifier = modifier.width(14.dp)) - Switch(checked = connected, enabled = !loading, onCheckedChange = { - onSwitch(!connected) - }, modifier = Modifier.testTag("switch_connect")) - } - if (connected && !loading) { - Column(modifier = modifier.padding(16.dp)) { - Text( - color = Color.Green, - fontStyle = FontStyle.Italic, - text = stringResource(R.string.connected_text) - ) - Spacer(modifier = modifier.height(10.dp)) - Row( - verticalAlignment = Alignment.CenterVertically - ) { - Surface( - onClick = { clipboardManager.setText(AnnotatedString(host)) }, - shape = RoundedCornerShape(6.dp), - ) { - Row( - modifier = modifier.padding(8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Text(host) - Spacer(modifier = modifier.width(8.dp)) - Icon( - painter = painterResource(R.drawable.copy_24), - contentDescription = "copy to clipboard" - ) - } - } - Spacer(modifier = modifier.width(12.dp)) - Surface( - onClick = { clipboardManager.setText(AnnotatedString(port)) }, - shape = RoundedCornerShape(6.dp), - ) { - Row( - modifier = modifier.padding(8.dp), - verticalAlignment = Alignment.CenterVertically, - ) { - Text(port) - Spacer(modifier = modifier.width(8.dp)) - Icon( - painter = painterResource(R.drawable.copy_24), - contentDescription = "copy to clipboard" - ) - } - } - } - } - } - } -} - -@Preview -@Composable -fun PreviewSocks5Client() { - val tag = "UI" - var connected by rememberSaveable { mutableStateOf(false) } - var loading by rememberSaveable { mutableStateOf(false) } - NymTheme { - Surface( - modifier = Modifier.fillMaxSize(), - color = MaterialTheme.colorScheme.background - ) { - S5ClientSwitch(connected, loading, { - when { - it -> Log.d(tag, "switch ON") - else -> Log.d(tag, "switch OFF") - } - connected = it - loading = false - }) - } - } -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Color.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Color.kt deleted file mode 100644 index 85daf1ecf4..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Color.kt +++ /dev/null @@ -1,19 +0,0 @@ -package net.nymtech.nyms5.ui.theme - -import androidx.compose.ui.graphics.Color - -val Purple80 = Color(0xFFD0BCFF) -val PurpleGrey80 = Color(0xFFCCC2DC) -val Pink80 = Color(0xFFEFB8C8) - -val Purple40 = Color(0xFF6650a4) -val PurpleGrey40 = Color(0xFF625b71) -val Pink40 = Color(0xFF7D5260) - -// Custom colors -// generated from https://m3.material.io/theme-builder#/custom -val yellow = Color(0xFFD3B919) -val lightYellow = Color(0xFF6D5E00) -val lightOnYellow = Color(0xFFFFFFFF) -val darkYellow = Color(0xFFE1C62A) -val darkOnYellow = Color(0xFF393000) diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Theme.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Theme.kt deleted file mode 100644 index 1792f65f66..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Theme.kt +++ /dev/null @@ -1,70 +0,0 @@ -package net.nymtech.nyms5.ui.theme - -import android.app.Activity -import android.os.Build -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.dynamicDarkColorScheme -import androidx.compose.material3.dynamicLightColorScheme -import androidx.compose.material3.lightColorScheme -import androidx.compose.runtime.Composable -import androidx.compose.runtime.SideEffect -import androidx.compose.ui.graphics.toArgb -import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.platform.LocalView -import androidx.core.view.WindowCompat - -private val DarkColorScheme = darkColorScheme( - primary = Purple80, - secondary = PurpleGrey80, - tertiary = Pink80 -) - -private val LightColorScheme = lightColorScheme( - primary = Purple40, - secondary = PurpleGrey40, - tertiary = Pink40 - - /* Other default colors to override - background = Color(0xFFFFFBFE), - surface = Color(0xFFFFFBFE), - onPrimary = Color.White, - onSecondary = Color.White, - onTertiary = Color.White, - onBackground = Color(0xFF1C1B1F), - onSurface = Color(0xFF1C1B1F), - */ -) - -@Composable -fun NymTheme( - darkTheme: Boolean = isSystemInDarkTheme(), - // Dynamic color is available on Android 12+ - dynamicColor: Boolean = true, - content: @Composable () -> Unit -) { - val colorScheme = when { - dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> { - val context = LocalContext.current - if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context) - } - - darkTheme -> DarkColorScheme - else -> LightColorScheme - } - val view = LocalView.current - if (!view.isInEditMode) { - SideEffect { - val window = (view.context as Activity).window - window.statusBarColor = colorScheme.primary.toArgb() - WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme - } - } - - MaterialTheme( - colorScheme = colorScheme, - typography = Typography, - content = content - ) -} \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Type.kt b/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Type.kt deleted file mode 100644 index e8f9620039..0000000000 --- a/nym-connect/native/android/app/src/main/java/net/nymtech/nyms5/ui/theme/Type.kt +++ /dev/null @@ -1,34 +0,0 @@ -package net.nymtech.nyms5.ui.theme - -import androidx.compose.material3.Typography -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp - -// Set of Material typography styles to start with -val Typography = Typography( - bodyLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp, - lineHeight = 24.sp, - letterSpacing = 0.5.sp - ) - /* Other default text styles to override - titleLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 22.sp, - lineHeight = 28.sp, - letterSpacing = 0.sp - ), - labelSmall = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Medium, - fontSize = 11.sp, - lineHeight = 16.sp, - letterSpacing = 0.5.sp - ) - */ -) \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/jniLibs/arm64-v8a/.gitkeep b/nym-connect/native/android/app/src/main/jniLibs/arm64-v8a/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nym-connect/native/android/app/src/main/jniLibs/armeabi-v7a/.gitkeep b/nym-connect/native/android/app/src/main/jniLibs/armeabi-v7a/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nym-connect/native/android/app/src/main/jniLibs/i686/.gitkeep b/nym-connect/native/android/app/src/main/jniLibs/i686/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nym-connect/native/android/app/src/main/jniLibs/x86_64/.gitkeep b/nym-connect/native/android/app/src/main/jniLibs/x86_64/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/nym-connect/native/android/app/src/main/play/contact-email.txt b/nym-connect/native/android/app/src/main/play/contact-email.txt deleted file mode 100644 index 93c78e19be..0000000000 --- a/nym-connect/native/android/app/src/main/play/contact-email.txt +++ /dev/null @@ -1 +0,0 @@ -contact@nymtech.net \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/play/contact-website.txt b/nym-connect/native/android/app/src/main/play/contact-website.txt deleted file mode 100644 index d4e37f0aa2..0000000000 --- a/nym-connect/native/android/app/src/main/play/contact-website.txt +++ /dev/null @@ -1 +0,0 @@ -https://nymtech.net/ \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/play/default-language.txt b/nym-connect/native/android/app/src/main/play/default-language.txt deleted file mode 100644 index f2b0341fed..0000000000 --- a/nym-connect/native/android/app/src/main/play/default-language.txt +++ /dev/null @@ -1 +0,0 @@ -en-US \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/play/listings/en-US/full-description.txt b/nym-connect/native/android/app/src/main/play/listings/en-US/full-description.txt deleted file mode 100644 index ee2b05d46d..0000000000 --- a/nym-connect/native/android/app/src/main/play/listings/en-US/full-description.txt +++ /dev/null @@ -1,7 +0,0 @@ -Nyms5 is an easy to use interface that allows you to -connect other applications to the Nym mixnet for privacy -protection. - -Nym mixnet hides your IP address or other unique identifiers -from your internet packets so snoopers on the internet can -not see what applications you are using. diff --git a/nym-connect/native/android/app/src/main/play/listings/en-US/graphics/icon/logo.png b/nym-connect/native/android/app/src/main/play/listings/en-US/graphics/icon/logo.png deleted file mode 100644 index 83e115a87d..0000000000 Binary files a/nym-connect/native/android/app/src/main/play/listings/en-US/graphics/icon/logo.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/play/listings/en-US/short-description.txt b/nym-connect/native/android/app/src/main/play/listings/en-US/short-description.txt deleted file mode 100644 index 6f5662cfce..0000000000 --- a/nym-connect/native/android/app/src/main/play/listings/en-US/short-description.txt +++ /dev/null @@ -1 +0,0 @@ -Nyms5 is a socks5 proxy to connect to the Nym mixnet for privacy protection diff --git a/nym-connect/native/android/app/src/main/play/listings/en-US/title.txt b/nym-connect/native/android/app/src/main/play/listings/en-US/title.txt deleted file mode 100644 index 7e94edaaee..0000000000 --- a/nym-connect/native/android/app/src/main/play/listings/en-US/title.txt +++ /dev/null @@ -1 +0,0 @@ -Nyms5 \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/nym-connect/native/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml deleted file mode 100644 index 2b068d1146..0000000000 --- a/nym-connect/native/android/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/native/android/app/src/main/res/drawable/copy_24.xml b/nym-connect/native/android/app/src/main/res/drawable/copy_24.xml deleted file mode 100644 index bac0f6001a..0000000000 --- a/nym-connect/native/android/app/src/main/res/drawable/copy_24.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/nym-connect/native/android/app/src/main/res/drawable/ic_launcher_background.xml b/nym-connect/native/android/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index 07d5da9cbf..0000000000 --- a/nym-connect/native/android/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/nym-connect/native/android/app/src/main/res/drawable/shield_24.xml b/nym-connect/native/android/app/src/main/res/drawable/shield_24.xml deleted file mode 100644 index e49a1f265d..0000000000 --- a/nym-connect/native/android/app/src/main/res/drawable/shield_24.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/nym-connect/native/android/app/src/main/res/drawable/warning_24.xml b/nym-connect/native/android/app/src/main/res/drawable/warning_24.xml deleted file mode 100644 index b1726a3610..0000000000 --- a/nym-connect/native/android/app/src/main/res/drawable/warning_24.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/nym-connect/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/nym-connect/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml deleted file mode 100644 index 036d09bc5f..0000000000 --- a/nym-connect/native/android/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/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/nym-connect/native/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml deleted file mode 100644 index 036d09bc5f..0000000000 --- a/nym-connect/native/android/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/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 4974445c9a..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png b/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png deleted file mode 100644 index 483ace7edf..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 59b2f1db44..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 307fb6aab9..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png b/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png deleted file mode 100644 index e634763b42..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 37a8d502c8..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 5b412e78a0..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png b/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png deleted file mode 100644 index 580c767c54..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 51a588fdee..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 65cefcb196..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png b/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 312d818bbe..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 5070e583a0..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 18252905f8..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png deleted file mode 100644 index 514ec36652..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 83e115a87d..0000000000 Binary files a/nym-connect/native/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/nym-connect/native/android/app/src/main/res/values/colors.xml b/nym-connect/native/android/app/src/main/res/values/colors.xml deleted file mode 100644 index f8c6127d32..0000000000 --- a/nym-connect/native/android/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/res/values/ic_launcher_background.xml b/nym-connect/native/android/app/src/main/res/values/ic_launcher_background.xml deleted file mode 100644 index a3b9258141..0000000000 --- a/nym-connect/native/android/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/native/android/app/src/main/res/values/strings.xml b/nym-connect/native/android/app/src/main/res/values/strings.xml deleted file mode 100644 index ff0cb1857d..0000000000 --- a/nym-connect/native/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,16 +0,0 @@ - - Nyms5 - Nym socks5 process - Nym proxy - 21 - Nym proxy - Connected - Stop - 127.0.0.1 - 1080 - https://harbourmaster.nymtech.net/v1/services?size=100 - DpB3cHAchJiNBQi5FrZx2csXb1mrHkpYh9Wzf8Rjsuko.ANNWrvHqMYuertHGHUrZdBntQhpzfbWekB39qez9U2Vx@2BuMSfMW3zpeAjKXyKLhmY4QW1DXurrtSPEJ6CjX3SEh - Connected to the mixnet - 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. - You must restart the application for the change to take effect. - \ No newline at end of file diff --git a/nym-connect/native/android/app/src/main/res/values/themes.xml b/nym-connect/native/android/app/src/main/res/values/themes.xml deleted file mode 100644 index be09533927..0000000000 --- a/nym-connect/native/android/app/src/main/res/values/themes.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - -