This pull requests
- Adds rust native support for the `asb` to listen on an onion service. Previously we were depedent on a seperately running `torc` client. Instead we now use [arti](https://tpo.pages.torproject.net/core/arti/), a rust implementation of the tor protocol.
- Removes the `tor.control_port` and `tor.socks5_port` property from the config of the `asb`
- Adds a new `tor.register_hidden_service` boolean property to the config of the `asb` which when enabled automatically runs a hidden service at startup
- Adds a new `tor.hidden_service_num_intro_points` config property to specify how many introduction points to register the onion service at
- Adds support for the `cli` to dial onion addresses
This is dependent on https://github.com/umgefahren/libp2p-tor/pull/24
Closes https://github.com/UnstoppableSwap/core/issues/16
- GUI: Changed terminology from "swap providers" to "makers"
- GUI: For each maker, we now display a unique deterministically generated avatar derived from the maker's public key
- Upgrade `sqlx` to `0.8`
- Use `arti_client@0.24` in combination with [`libp2p-community-tor`](https://crates.io/crates/libp2p-community-tor/0.4.1). https://github.com/umgefahren/libp2p-tor/pull/18 was required for this.
- Display spinner in GUI while Tor circuits are being established
- Remove unused dependencies (`once_cell`, `tauri-plugin-devtools`, `digest`, `hyper`, `itertools`, `erased_serde`)
- Bundle roboto font from npm registry
Alice will accept a cooperative redeem request in both `AliceState::BtcPunishable` and `AliceState::BtcPunished` states. This allows Bob to request a cooperative redeem even if `tx_punish` has not been confirmed yet.
Our libp2p version is out of date, and we need to tackle the upgrade even though it's a significant undertaking. This'll also fix some other [issues](https://github.com/UnstoppableSwap/core/issues/95).
## This PR includes the following changes:
- Breaking network protocol change: The libp2p version has been upgraded to 0.53 which includes breaking network protocol changes. ASBs and CLIs will not be able to swap if one of them is on the old version.
- ASB: Transfer proofs will be repeatedly sent until they are acknowledged by the other party. This fixes a bug where it'd seem to Bob as if the Alice never locked the Monero. Forcing the swap to be refunded.
- CLI: Encrypted signatures will be repeatedly sent until they are acknowledged by the other party
- CLI+ASB: Libp2p network errors in request-response protocols are now propagated throught the event loop channels. This allows the caller to retry if an error occurs (e.g timeout)
Closes https://github.com/UnstoppableSwap/core/issues/101, https://github.com/UnstoppableSwap/core/issues/95
Closes#43. This PR creates a new event, which is emitted by the watcher daemon when the BTC balance changes. Then, on the guest side, we simply update the balance when this event is received.
This PR tackles #92
- Add the `tauri-plugin-cli` (only on desktop)
- Check in the frontend if the `--testnet` flag is set. If it's set we pass `testnet=true` to the `initialize_context` command on invokation
- We add the `vite-plugin-top-level-await` to allow top level await in all browsers
- Remove the `bitcoin_confirmation_target` from settings for simplicity
- Send event when new swap state is inserated into database. The event only has the `swap_id` attached. The frontend then sends a request to the `get_swap_info` command to retrieve the updated version
- Send event when the Bitcoin lock transaction gets a new confirmation
- A new `watcher` daemon runs contineously and sends an event when the timelock updated. The event has the the `swap_id` and the timelock attached
- Display logs on `ProcessExitedPage` (if swap was stopped prematurely)
- Rename `CliLogEmittedEvent` to `TauriLogEvent`
- Apply env_filter to tracing terminal writer to silence logging from other crates
- Add `.env.*` files in `src-gui` to `.gitingore`
Closes#93 and #12
- Implemented dual persistence strategy:
- **User Settings**: Persisted across app restarts using `tauri-plugin-store`.
- **Transient State**: Persisted across page reloads using `sessionStorage`.
- Added `settingsSlice` reducer for managing persistent user settings.
- Updated Redux store configuration to handle multiple persistence layers.
- Added a new Settings page in the GUI where users can specify custom Electrum RPC URLs for Bitcoin and Monero node URLs.
- Users can input their preferred Electrum server (`ssl://host:port`) and Monero daemon (`http://host:port`).
- Input fields include validation to ensure correct URL formats.
- Settings persist across application restarts using Tauri's storage plugin.
- A reset option is available to revert to default settings.
- Improved the Daemon Controller in the Help page:
- Renamed `RpcControlBox` to `DaemonControlBox` for clarity.
- Users can now start the daemon manually if it isn't running or has failed.
- Added a "Restart GUI" button to apply new settings immediately.
- Displayed the daemon's status within the controller.
- Upgraded Tauri and related plugins to stable version `2.0.0`:
- Updated `tauri`, `tauri-build`, and `tauri-utils` to `2.0.0`.
- Ensured compatibility with the latest stable release.
- Updated Tauri plugins to version `2.0.0`:
- `tauri-plugin-clipboard-manager`
- `tauri-plugin-shell`
- Added new plugins:
- `tauri-plugin-store` for settings persistence.
- `tauri-plugin-process` to enable application relaunch.
- Deferred Context initialization until explicitly triggered from the frontend.
- Moved Context setup from the `setup` function to a new `initialize_context` Tauri command.
- Allows the application to start without immediately initializing the backend context.
- Context initialization now considers user-provided settings for Electrum and Monero nodes.
- Introduced a `ValidatedTextField` component for form inputs with validation logic.
- Provides immediate feedback on input validity.
- Used in the Settings page for Electrum and Monero node URLs.
- If the user provides an override Monero remote daemon, we check if it reachable and on the correct network before starting the `monero-wallet-rpc`
- Changed `bitcoin_confirmation_target` type from `usize` to `u16`.