diff --git a/.cargo/config.toml b/.cargo/config.toml
index 5704896780..d59b360d40 100644
--- a/.cargo/config.toml
+++ b/.cargo/config.toml
@@ -2,7 +2,7 @@
JEMALLOC_SYS_WITH_MALLOC_CONF = "background_thread:true,narenas:1,tcache:false,dirty_decay_ms:0,muzzy_decay_ms:0,metadata_thp:auto"
[target.'cfg(all())']
-rustflags = [ "-Zshare-generics=y" ]
+rustflags = [ "-Zshare-generics=y", '--cfg=curve25519_dalek_backend="fiat"' ]
# # Install lld using package manager
# [target.x86_64-unknown-linux-gnu]
@@ -25,3 +25,6 @@ rustflags = [ "-Zshare-generics=y" ]
[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'
rustflags = [ "--cfg=web_sys_unstable_apis" ]
+
+[target.x86_64-pc-windows-msvc]
+rustflags = ["-Ctarget-feature=+crt-static"]
diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml
index 585f9d4856..0849cca89a 100644
--- a/.github/workflows/dev-build.yml
+++ b/.github/workflows/dev-build.yml
@@ -51,17 +51,6 @@ jobs:
- name: Build
run: cargo build --release
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- NAME="mm2_$KDF_BUILD_TAG-linux-x86-64.zip"
- zip $NAME target/release/mm2 -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
@@ -70,6 +59,7 @@ jobs:
NAME="kdf_$KDF_BUILD_TAG-linux-x86-64.zip"
zip $NAME target/release/kdf -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -125,16 +115,6 @@ jobs:
- name: Build
run: cargo build --release --target x86_64-apple-darwin
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- NAME="mm2_$KDF_BUILD_TAG-mac-x86-64.zip"
- zip $NAME target/x86_64-apple-darwin/release/mm2 -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
@@ -143,6 +123,7 @@ jobs:
NAME="kdf_$KDF_BUILD_TAG-mac-x86-64.zip"
zip $NAME target/x86_64-apple-darwin/release/kdf -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -186,17 +167,6 @@ jobs:
- name: Build
run: cargo build --release --target aarch64-apple-darwin
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- NAME="mm2_$KDF_BUILD_TAG-mac-arm64.zip"
- zip $NAME target/aarch64-apple-darwin/release/mm2 -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
@@ -205,6 +175,7 @@ jobs:
NAME="kdf_$KDF_BUILD_TAG-mac-arm64.zip"
zip $NAME target/aarch64-apple-darwin/release/kdf -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -247,25 +218,15 @@ jobs:
- name: Build
run: cargo build --release
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- $NAME="mm2_$Env:KDF_BUILD_TAG-win-x86-64.zip"
- 7z a $NAME .\target\release\mm2.exe .\target\release\*.dll
- $SAFE_DIR_NAME = $Env:BRANCH_NAME -replace '/', '-'
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
if: ${{ env.AVAILABLE != '' }}
run: |
$NAME="kdf_$Env:KDF_BUILD_TAG-win-x86-64.zip"
- 7z a $NAME .\target\release\kdf.exe .\target\release\*.dll
+ 7z a $NAME .\target\release\kdf.exe
$SAFE_DIR_NAME = $Env:BRANCH_NAME -replace '/', '-'
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -309,18 +270,6 @@ jobs:
- name: Build
run: cargo rustc --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- NAME="mm2_$KDF_BUILD_TAG-mac-dylib-x86-64.zip"
- cp target/x86_64-apple-darwin/release/libkdflib.a target/x86_64-apple-darwin/release/libmm2.a
- zip $NAME target/x86_64-apple-darwin/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
@@ -330,6 +279,7 @@ jobs:
mv target/x86_64-apple-darwin/release/libkdflib.a target/x86_64-apple-darwin/release/libkdf.a
zip $NAME target/x86_64-apple-darwin/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -438,18 +388,6 @@ jobs:
- name: Build
run: cargo rustc --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- NAME="mm2_$KDF_BUILD_TAG-ios-aarch64.zip"
- cp target/aarch64-apple-ios/release/libkdflib.a target/aarch64-apple-ios/release/libmm2.a
- zip $NAME target/aarch64-apple-ios/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
@@ -459,6 +397,7 @@ jobs:
mv target/aarch64-apple-ios/release/libkdflib.a target/aarch64-apple-ios/release/libkdf.a
zip $NAME target/aarch64-apple-ios/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -516,18 +455,6 @@ jobs:
export PATH=$PATH:/android-ndk/bin
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- NAME="mm2_$KDF_BUILD_TAG-android-aarch64.zip"
- cp target/aarch64-linux-android/release/libkdflib.a target/aarch64-linux-android/release/libmm2.a
- zip $NAME target/aarch64-linux-android/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
@@ -537,6 +464,7 @@ jobs:
mv target/aarch64-linux-android/release/libkdflib.a target/aarch64-linux-android/release/libkdf.a
zip $NAME target/aarch64-linux-android/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -594,18 +522,6 @@ jobs:
export PATH=$PATH:/android-ndk/bin
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib
- - name: Compress mm2 build output
- env:
- AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
- if: ${{ env.AVAILABLE != '' }}
- run: |
- NAME="mm2_$KDF_BUILD_TAG-android-armv7.zip"
- cp target/armv7-linux-androideabi/release/libkdflib.a target/armv7-linux-androideabi/release/libmm2.a
- zip $NAME target/armv7-linux-androideabi/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
env:
AVAILABLE: ${{ secrets.FILE_SERVER_KEY }}
@@ -615,6 +531,7 @@ jobs:
mv target/armv7-linux-androideabi/release/libkdflib.a target/armv7-linux-androideabi/release/libkdf.a
zip $NAME target/armv7-linux-androideabi/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml
index 7fec248c88..75e9262b55 100644
--- a/.github/workflows/release-build.yml
+++ b/.github/workflows/release-build.yml
@@ -51,19 +51,12 @@ jobs:
- name: Build
run: cargo build --release
- - name: Compress mm2 build output
- run: |
- NAME="mm2_$KDF_BUILD_TAG-linux-x86-64.zip"
- zip $NAME target/release/mm2 -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
NAME="kdf_$KDF_BUILD_TAG-linux-x86-64.zip"
zip $NAME target/release/kdf -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -116,19 +109,12 @@ jobs:
- name: Build
run: cargo build --release --target x86_64-apple-darwin
- - name: Compress mm2 build output
- run: |
- NAME="mm2_$KDF_BUILD_TAG-mac-x86-64.zip"
- zip $NAME target/x86_64-apple-darwin/release/mm2 -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
NAME="kdf_$KDF_BUILD_TAG-mac-x86-64.zip"
zip $NAME target/x86_64-apple-darwin/release/kdf -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -172,19 +158,12 @@ jobs:
- name: Build
run: cargo build --release --target aarch64-apple-darwin
- - name: Compress mm2 build output
- run: |
- NAME="mm2_$KDF_BUILD_TAG-mac-arm64.zip"
- zip $NAME target/aarch64-apple-darwin/release/mm2 -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
NAME="kdf_$KDF_BUILD_TAG-mac-arm64.zip"
zip $NAME target/aarch64-apple-darwin/release/kdf -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -227,19 +206,12 @@ jobs:
- name: Build
run: cargo build --release
- - name: Compress mm2 build output
- run: |
- $NAME="mm2_$Env:KDF_BUILD_TAG-win-x86-64.zip"
- 7z a $NAME .\target\release\mm2.exe .\target\release\*.dll
- $SAFE_DIR_NAME = $Env:BRANCH_NAME -replace '/', '-'
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
$NAME="kdf_$Env:KDF_BUILD_TAG-win-x86-64.zip"
7z a $NAME .\target\release\kdf.exe .\target\release\*.dll
$SAFE_DIR_NAME = $Env:BRANCH_NAME -replace '/', '-'
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -283,21 +255,13 @@ jobs:
- name: Build
run: cargo rustc --target x86_64-apple-darwin --lib --release --package mm2_bin_lib --crate-type=staticlib
- - name: Compress mm2 build output
- run: |
- NAME="mm2_$KDF_BUILD_TAG-mac-dylib-x86-64.zip"
- cp target/x86_64-apple-darwin/release/libkdflib.a target/x86_64-apple-darwin/release/libmm2.a
- zip $NAME target/x86_64-apple-darwin/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
NAME="kdf_$KDF_BUILD_TAG-mac-dylib-x86-64.zip"
mv target/x86_64-apple-darwin/release/libkdflib.a target/x86_64-apple-darwin/release/libkdf.a
zip $NAME target/x86_64-apple-darwin/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -403,21 +367,13 @@ jobs:
- name: Build
run: cargo rustc --target aarch64-apple-ios --lib --release --package mm2_bin_lib --crate-type=staticlib
- - name: Compress mm2 build output
- run: |
- NAME="mm2_$KDF_BUILD_TAG-ios-aarch64.zip"
- mv target/aarch64-apple-ios/release/libkdflib.a target/aarch64-apple-ios/release/libmm2.a
- zip $NAME target/aarch64-apple-ios/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
NAME="kdf_$KDF_BUILD_TAG-ios-aarch64.zip"
mv target/aarch64-apple-ios/release/libkdflib.a target/aarch64-apple-ios/release/libkdf.a
zip $NAME target/aarch64-apple-ios/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -475,21 +431,13 @@ jobs:
export PATH=$PATH:/android-ndk/bin
CC_aarch64_linux_android=aarch64-linux-android21-clang CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER=aarch64-linux-android21-clang cargo rustc --target=aarch64-linux-android --lib --release --crate-type=staticlib --package mm2_bin_lib
- - name: Compress mm2 build output
- run: |
- NAME="mm2_$KDF_BUILD_TAG-android-aarch64.zip"
- mv target/aarch64-linux-android/release/libkdflib.a target/aarch64-linux-android/release/libmm2.a
- zip $NAME target/aarch64-linux-android/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
NAME="kdf_$KDF_BUILD_TAG-android-aarch64.zip"
mv target/aarch64-linux-android/release/libkdflib.a target/aarch64-linux-android/release/libkdf.a
zip $NAME target/aarch64-linux-android/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
@@ -547,21 +495,13 @@ jobs:
export PATH=$PATH:/android-ndk/bin
CC_armv7_linux_androideabi=armv7a-linux-androideabi21-clang CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER=armv7a-linux-androideabi21-clang cargo rustc --target=armv7-linux-androideabi --lib --release --crate-type=staticlib --package mm2_bin_lib
- - name: Compress mm2 build output
- run: |
- NAME="mm2_$KDF_BUILD_TAG-android-armv7.zip"
- mv target/armv7-linux-androideabi/release/libkdflib.a target/armv7-linux-androideabi/release/libmm2.a
- zip $NAME target/armv7-linux-androideabi/release/libmm2.a -j
- SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
- mkdir $SAFE_DIR_NAME
- mv $NAME ./$SAFE_DIR_NAME/
-
- name: Compress kdf build output
run: |
NAME="kdf_$KDF_BUILD_TAG-android-armv7.zip"
mv target/armv7-linux-androideabi/release/libkdflib.a target/armv7-linux-androideabi/release/libkdf.a
zip $NAME target/armv7-linux-androideabi/release/libkdf.a -j
SAFE_DIR_NAME=$(echo "$BRANCH_NAME" | tr '/' '-')
+ mkdir $SAFE_DIR_NAME
mv $NAME ./$SAFE_DIR_NAME/
- name: Upload build artifact
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index c0da60616b..bc242f6547 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -268,4 +268,4 @@ jobs:
uses: ./.github/actions/build-cache
- name: Test
- run: WASM_BINDGEN_TEST_TIMEOUT=600 GECKODRIVER=/bin/geckodriver wasm-pack test --firefox --headless mm2src/mm2_main
+ run: WASM_BINDGEN_TEST_TIMEOUT=1200 GECKODRIVER=/bin/geckodriver wasm-pack test --firefox --headless mm2src/mm2_main
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 132dda9919..831bc7bc68 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,105 @@
+## v2.5.0-beta - 2025-07-04
+
+### Features:
+
+**WalletConnect Integration**:
+- WalletConnect v2 support for EVM and Cosmos coins was implemented, enabling wallet connection and transaction signing via the WalletConnect protocol. [#2223](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2223) [#2485](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2485) [#2508](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2508)
+
+---
+
+### Work in Progress (WIP) Features:
+
+**Cosmos Network and IBC Swaps**:
+- Pre-swap validation logic was implemented for maker order creation, requiring HTLC assets and healthy IBC channels on the Cosmos network, with all changes gated behind the `ibc-routing-for-swaps` feature. [#2459](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2459)
+- The taker and maker order types were extended with an `order_metadata` field to carry protocol/IBC details, and cross-checks for IBC channels were added (also feature-gated), enabling both parties to validate IBC routing before a swap. [#2476](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2476)
+
+**TRON Integration**:
+- Initial groundwork for TRON integration was started, including the addition of basic structures and boilerplate code; no end-to-end functionality is yet available. [#2425](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2425)
+
+---
+
+### Enhancements/Fixes:
+
+**Event Streaming**:
+- Streamer IDs in the event-streaming system were strongly typed to improve type safety and code clarity. [#2441](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2441)
+
+**Peer-to-Peer Network**:
+- Hardcoded seed node IP addresses were removed from the peer-to-peer network configuration to improve maintainability. [#2439](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2439)
+
+**Orders and Trading Protocol**:
+- The minimum trading volume logic was revised to remove BTC-specific volume behavior, standardizing the calculation across all coins. [#2483](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2483)
+
+**Tendermint / Cosmos**:
+- A helper for generating internal transaction IDs for Tendermint transactions was introduced. [#2438](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2438)
+- The IBC channel handler was improved to enhance safety and reliability when interacting with IBC channels. [#2298](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2298)
+
+**Wallet**:
+- Unconfirmed z-coin notes are now correctly tracked. [#2331](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2331)
+- HD multi-address support for message signing was implemented, allowing message signatures from multiple derived addresses. [#2432](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2432) [#2474](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2474)
+- A `delete_wallet` RPC was introduced to securely remove wallets after password confirmation, while preventing the deletion of the currently active wallet. [#2497](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2497)
+- A race condition during the initialization of Trezor-based hardware wallets was resolved by ensuring the correct account and address are loaded before fetching the enabled address, preventing startup errors. [#2504](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2504)
+
+**UTXO**:
+- Validation of expected public keys for p2pk inputs was corrected, resolving an error in p2pk transaction processing. [#2408](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2408)
+- Transaction fee calculation and minimum relay fee handling for UTXO coins were improved for accurate fee estimation. [#2316](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2316)
+
+**EVM / ERC20**:
+- ETH address serialization in event streaming was updated to use the `AddrToString` trait for consistency. [#2440](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2440)
+
+**Pubkey Banning**:
+- Expirable bans for pubkeys were introduced, allowing temporary exclusion of certain public keys. [#2455](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2455)
+
+**RPC Interface**:
+- A unified interface was implemented for legacy and current RPC methods. [#2450](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2450)
+
+**DNS Resolution**:
+- IP resolution logic was improved to fail only if no IPv4 address is found. [#2487](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2487)
+
+**Database and File System**:
+- More replacements of `dbdir` with `address_dir` were made as part of an ongoing improvement to database architecture. [#2398](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2398)
+
+**Build and Dependency Management**:
+- Duplicated mm2 build artifacts were removed from the build process to reduce clutter. [#2448](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2448)
+- Static CRT linking was enabled for MSVC builds, improving the portability of Windows binaries. [#2464](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2464)
+- The `timed-map` dependency was bumped to version `1.4.1` for improved performance and stability. [#2413](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2413) [#2481](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2481)
+- The `base58` crate was removed and replaced with `bs58` throughout the codebase for consistency and security. [#2427](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2427)
+- Dependencies were reorganized using the `workspace.dependencies` feature for centralized management. [#2449](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2449)
+
+---
+
+### Other Changes:
+
+**Documentation**:
+- Old URLs referencing atomicDEX or previous documentation pages were updated throughout the documentation. [#2428](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2428)
+- A DeepWiki badge was added to the README to highlight documentation resources. [#2463](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2463)
+
+**Core Maintenance**:
+- Workspace dependencies were organized for consistent dependency management across the project. [#2449](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2449)
+- A unit test was added to validate DEX fee handling for ZCoin. [#2460](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2460)
+- Improved ERC20 token lookup to use platform ticker alongside contract address for proper token identification across platforms. [#2445](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2445)
+
+---
+
+### NB - Backwards compatibility breaking changes:
+
+**WalletConnect/EVM Coin Activation Policy**:
+- The `priv_key_policy` field for EVM coin activation now requires the new enum variant format: `"priv_key_policy": { "type": "ContextPrivKey" }`. [#2223](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2223)
+
+**TRON/EVM Chain Specification**:
+- EVM coin configurations must now include `chain_id` inside the `protocol_data` field. Legacy `chain_id` fields are deprecated. [#2425](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2425)
+
+**mm2 Build Artifacts**:
+- The `mm2` binaries have been removed from build outputs. Users must reference new artifact locations. [#2448](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2448)
+
+**Seednode Configuration**:
+- Hardcoded seed nodes were removed. KDF will no longer connect to 8762 mainnet by default without proper `seednodes` configuration. [#2439](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2439)
+
+**IBC/Cosmos Changes**:
+- The `ibc_chains` and `ibc_transfer_channels` RPC endpoints have been removed. [#2459](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2459)
+- The `ibc_source_channel` field now requires numeric values only (e.g., `12` instead of `channel-12`). [#2459](https://github.com/KomodoPlatform/komodo-defi-framework/pull/2459)
+
+---
+
## v2.4.0-beta - 2025-05-02
### Features:
diff --git a/Cargo.lock b/Cargo.lock
index e2ebd94a86..c6cd5560d8 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -35,25 +35,14 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
[[package]]
name = "aead"
-version = "0.4.1"
+version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "922b33332f54fc0ad13fa3e514601e8d30fb54e1f3eadc36643f6526db645621"
+checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0"
dependencies = [
+ "crypto-common",
"generic-array",
]
-[[package]]
-name = "aes"
-version = "0.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8"
-dependencies = [
- "cfg-if 1.0.0",
- "cipher 0.3.0",
- "cpufeatures 0.2.11",
- "opaque-debug",
-]
-
[[package]]
name = "aes"
version = "0.8.3"
@@ -61,19 +50,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2"
dependencies = [
"cfg-if 1.0.0",
- "cipher 0.4.4",
- "cpufeatures 0.2.11",
+ "cipher",
+ "cpufeatures",
]
[[package]]
name = "aes-gcm"
-version = "0.9.2"
+version = "0.10.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f"
+checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1"
dependencies = [
"aead",
- "aes 0.7.5",
- "cipher 0.3.0",
+ "aes",
+ "cipher",
"ctr",
"ghash",
"subtle",
@@ -130,9 +119,9 @@ dependencies = [
[[package]]
name = "anyhow"
-version = "1.0.42"
+version = "1.0.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "595d3cfa7a60d4555cb5067b99f07142a08ea778de5cf993f7b75c7d8fabc486"
+checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6"
[[package]]
name = "argon2"
@@ -142,7 +131,7 @@ checksum = "17ba4cac0a46bc1d2912652a751c47f2a9f3a7fe89bcae2275d418f5270402f9"
dependencies = [
"base64ct",
"blake2",
- "cpufeatures 0.2.11",
+ "cpufeatures",
"password-hash",
"zeroize",
]
@@ -241,7 +230,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10f203db73a71dfa2fb6dd22763990fa26f3d2625a6da2da900d23b87d26be27"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -258,8 +247,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "531b97fb4cd3dfdce92c35dedbfdc1f0b9d8091c8ca943d6dae340ef5012d514"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -268,7 +257,7 @@ version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0de5164e5edbf51c45fb8c2d9664ae1c095cce1b265ecf7569093c0d66ef690"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"futures-sink",
"futures-util",
"memchr",
@@ -307,12 +296,12 @@ dependencies = [
"async-trait",
"axum-core",
"bitflags 1.3.2",
- "bytes 1.4.0",
+ "bytes",
"futures-util",
"http 0.2.12",
- "http-body 0.4.5",
+ "http-body",
"hyper",
- "itoa 1.0.10",
+ "itoa",
"matchit",
"memchr",
"mime",
@@ -333,10 +322,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
dependencies = [
"async-trait",
- "bytes 1.4.0",
+ "bytes",
"futures-util",
"http 0.2.12",
- "http-body 0.4.5",
+ "http-body",
"mime",
"rustversion",
"tower-layer",
@@ -370,12 +359,6 @@ version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
-[[package]]
-name = "base58"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581"
-
[[package]]
name = "base64"
version = "0.11.0"
@@ -681,16 +664,6 @@ version = "1.4.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610"
-[[package]]
-name = "bytes"
-version = "0.4.12"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c"
-dependencies = [
- "byteorder",
- "iovec",
-]
-
[[package]]
name = "bytes"
version = "1.4.0"
@@ -712,7 +685,7 @@ version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"
dependencies = [
- "cipher 0.4.4",
+ "cipher",
]
[[package]]
@@ -735,25 +708,24 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chacha20"
-version = "0.8.2"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c80e5460aa66fe3b91d40bcbdab953a597b60053e34d684ac6903f863b680a6"
+checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818"
dependencies = [
"cfg-if 1.0.0",
- "cipher 0.3.0",
- "cpufeatures 0.2.11",
- "zeroize",
+ "cipher",
+ "cpufeatures",
]
[[package]]
name = "chacha20poly1305"
-version = "0.9.1"
+version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a18446b09be63d457bbec447509e85f662f32952b035ce892290396bc0b0cff5"
+checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35"
dependencies = [
"aead",
"chacha20",
- "cipher 0.3.0",
+ "cipher",
"poly1305",
"zeroize",
]
@@ -786,15 +758,6 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "cipher"
-version = "0.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7"
-dependencies = [
- "generic-array",
-]
-
[[package]]
name = "cipher"
version = "0.4.4"
@@ -803,6 +766,7 @@ checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
dependencies = [
"crypto-common",
"inout",
+ "zeroize",
]
[[package]]
@@ -830,15 +794,15 @@ version = "0.1.0"
dependencies = [
"async-std",
"async-trait",
- "base58",
"base64 0.21.7",
"bip32",
"bitcoin",
"bitcoin_hashes",
"bitcrypto",
"blake2b_simd",
+ "bs58 0.4.0",
"byteorder",
- "bytes 0.4.12",
+ "bytes",
"cfg-if 1.0.0",
"chain",
"chrono",
@@ -849,7 +813,7 @@ dependencies = [
"db_common",
"derive_more",
"dirs",
- "ed25519-dalek",
+ "ed25519-dalek 1.0.1",
"enum_derives",
"ethabi",
"ethcore-transaction",
@@ -870,6 +834,7 @@ dependencies = [
"js-sys",
"jsonrpc-core",
"jubjub",
+ "kdf_walletconnect",
"keys",
"lazy_static",
"libc",
@@ -881,7 +846,6 @@ dependencies = [
"mm2_db",
"mm2_err_handle",
"mm2_event_stream",
- "mm2_git",
"mm2_io",
"mm2_metamask",
"mm2_metrics",
@@ -965,6 +929,7 @@ dependencies = [
"ethereum-types",
"futures 0.3.28",
"hex",
+ "kdf_walletconnect",
"lightning",
"lightning-background-processor",
"lightning-invoice",
@@ -977,6 +942,7 @@ dependencies = [
"parking_lot",
"rpc",
"rpc_task",
+ "secp256k1 0.24.3",
"ser_error",
"ser_error_derive",
"serde",
@@ -993,7 +959,7 @@ dependencies = [
"arrayref",
"async-trait",
"backtrace",
- "bytes 1.4.0",
+ "bytes",
"cc",
"cfg-if 1.0.0",
"chrono",
@@ -1008,7 +974,7 @@ dependencies = [
"gstuff",
"hex",
"http 0.2.12",
- "http-body 0.1.0",
+ "http-body",
"hyper",
"hyper-rustls 0.24.2",
"itertools",
@@ -1138,15 +1104,6 @@ dependencies = [
"thiserror",
]
-[[package]]
-name = "cpufeatures"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8"
-dependencies = [
- "libc",
-]
-
[[package]]
name = "cpufeatures"
version = "0.2.11"
@@ -1314,7 +1271,7 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
name = "crypto"
version = "1.0.0"
dependencies = [
- "aes 0.8.3",
+ "aes",
"argon2",
"arrayref",
"async-trait",
@@ -1325,7 +1282,7 @@ dependencies = [
"bs58 0.4.0",
"cbc",
"cfg-if 1.0.0",
- "cipher 0.4.4",
+ "cipher",
"common",
"derive_more",
"enum-primitive-derive",
@@ -1380,6 +1337,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
+ "rand_core 0.6.4",
"typenum",
]
@@ -1420,11 +1378,11 @@ dependencies = [
[[package]]
name = "ctr"
-version = "0.7.0"
+version = "0.9.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481"
+checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
dependencies = [
- "cipher 0.3.0",
+ "cipher",
]
[[package]]
@@ -1453,18 +1411,31 @@ dependencies = [
[[package]]
name = "curve25519-dalek"
-version = "4.0.0-rc.1"
+version = "4.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d4ba9852b42210c7538b75484f9daa0655e9a3ac04f693747bb0f02cf3cfe16"
+checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be"
dependencies = [
"cfg-if 1.0.0",
+ "cpufeatures",
+ "curve25519-dalek-derive",
+ "digest 0.10.7",
"fiat-crypto",
- "packed_simd_2",
- "platforms",
+ "rustc_version 0.4.0",
"subtle",
"zeroize",
]
+[[package]]
+name = "curve25519-dalek-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3"
+dependencies = [
+ "proc-macro2",
+ "quote 1.0.37",
+ "syn 2.0.77",
+]
+
[[package]]
name = "curve25519-dalek-ng"
version = "4.1.1"
@@ -1500,7 +1471,7 @@ dependencies = [
"codespan-reporting",
"lazy_static",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"scratch",
"syn 1.0.95",
]
@@ -1518,7 +1489,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b846f081361125bfc8dc9d3940c84e1fd83ba54bbca7b17cd29483c828be0704"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -1541,7 +1512,7 @@ dependencies = [
"fnv",
"ident_case",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"strsim",
"syn 1.0.95",
]
@@ -1553,7 +1524,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835"
dependencies = [
"darling_core",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -1615,7 +1586,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -1693,12 +1664,12 @@ dependencies = [
[[package]]
name = "ed25519"
-version = "1.5.2"
+version = "1.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369"
+checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7"
dependencies = [
"serde",
- "signature 1.4.0",
+ "signature 1.6.4",
]
[[package]]
@@ -1731,7 +1702,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d"
dependencies = [
"curve25519-dalek 3.2.0",
- "ed25519 1.5.2",
+ "ed25519 1.5.3",
"rand 0.7.3",
"serde",
"serde_bytes",
@@ -1739,6 +1710,21 @@ dependencies = [
"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.3",
+ "ed25519 2.2.3",
+ "rand_core 0.6.4",
+ "serde",
+ "sha2 0.10.7",
+ "subtle",
+ "zeroize",
+]
+
[[package]]
name = "edit-distance"
version = "2.1.0"
@@ -1791,9 +1777,9 @@ version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116"
dependencies = [
- "heck",
+ "heck 0.4.0",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -1804,7 +1790,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c375b9c5eadb68d0a6efee2999fef292f45854c3444c86f09d8ab086ba942b0e"
dependencies = [
"num-traits",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -1814,7 +1800,7 @@ version = "0.1.0"
dependencies = [
"itertools",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -1834,7 +1820,7 @@ dependencies = [
[[package]]
name = "equihash"
version = "0.1.0"
-source = "git+https://github.com/KomodoPlatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
+source = "git+https://github.com/komodoplatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
dependencies = [
"blake2b_simd",
"byteorder",
@@ -2012,9 +1998,9 @@ dependencies = [
[[package]]
name = "fiat-crypto"
-version = "0.1.20"
+version = "0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e825f6987101665dea6ec934c09ec6d721de7bc1bf92248e1d5810c8cd636b77"
+checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d"
[[package]]
name = "findshlibs"
@@ -2033,7 +2019,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c"
dependencies = [
"byteorder",
- "rand 0.8.4",
+ "rand 0.8.5",
"rustc-hex",
"static_assertions",
]
@@ -2087,8 +2073,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26c4b37de5ae15812a764c958297cfc50f5c010438f60c6ce75d11b802abd404"
dependencies = [
"cbc",
- "cipher 0.4.4",
- "libm 0.2.7",
+ "cipher",
+ "libm",
"num-bigint",
"num-integer",
"num-traits",
@@ -2200,8 +2186,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -2315,9 +2301,9 @@ dependencies = [
[[package]]
name = "ghash"
-version = "0.4.2"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7bbd60caa311237d508927dbba7594b483db3ef05faa55172fcf89b1bcda7853"
+checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1"
dependencies = [
"opaque-debug",
"polyval",
@@ -2392,7 +2378,7 @@ version = "0.3.24"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"fnv",
"futures-core",
"futures-sink",
@@ -2469,7 +2455,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270"
dependencies = [
"base64 0.21.7",
- "bytes 1.4.0",
+ "bytes",
"headers-core",
"http 0.2.12",
"httpdate",
@@ -2492,6 +2478,12 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
[[package]]
name = "hermit-abi"
version = "0.1.14"
@@ -2531,6 +2523,15 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "hkdf"
+version = "0.12.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
+dependencies = [
+ "hmac 0.12.1",
+]
+
[[package]]
name = "hmac"
version = "0.8.1"
@@ -2582,38 +2583,26 @@ dependencies = [
"winapi",
]
-[[package]]
-name = "http"
-version = "0.1.21"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0"
-dependencies = [
- "bytes 0.4.12",
- "fnv",
- "itoa 0.4.6",
-]
-
[[package]]
name = "http"
version = "0.2.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"fnv",
- "itoa 1.0.10",
+ "itoa",
]
[[package]]
-name = "http-body"
-version = "0.1.0"
+name = "http"
+version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d"
+checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
dependencies = [
- "bytes 0.4.12",
- "futures 0.1.29",
- "http 0.1.21",
- "tokio-buf",
+ "bytes",
+ "fnv",
+ "itoa",
]
[[package]]
@@ -2622,7 +2611,7 @@ version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"http 0.2.12",
"pin-project-lite 0.2.9",
]
@@ -2672,16 +2661,16 @@ version = "0.14.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"futures-channel",
"futures-core",
"futures-util",
"h2",
"http 0.2.12",
- "http-body 0.4.5",
+ "http-body",
"httparse",
"httpdate",
- "itoa 1.0.10",
+ "itoa",
"pin-project-lite 0.2.9",
"socket2 0.4.9",
"tokio",
@@ -2848,7 +2837,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -2910,15 +2899,6 @@ dependencies = [
"windows-sys 0.45.0",
]
-[[package]]
-name = "iovec"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e"
-dependencies = [
- "libc",
-]
-
[[package]]
name = "ipconfig"
version = "0.3.0"
@@ -2946,12 +2926,6 @@ dependencies = [
"either",
]
-[[package]]
-name = "itoa"
-version = "0.4.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6"
-
[[package]]
name = "itoa"
version = "1.0.10"
@@ -3003,6 +2977,20 @@ dependencies = [
"serde_json",
]
+[[package]]
+name = "jsonwebtoken"
+version = "8.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378"
+dependencies = [
+ "base64 0.21.7",
+ "pem",
+ "ring 0.16.20",
+ "serde",
+ "serde_json",
+ "simple_asn1",
+]
+
[[package]]
name = "jubjub"
version = "0.5.1"
@@ -3029,6 +3017,47 @@ dependencies = [
"sha2 0.10.7",
]
+[[package]]
+name = "kdf_walletconnect"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "base64 0.21.7",
+ "cfg-if 1.0.0",
+ "chrono",
+ "common",
+ "db_common",
+ "derive_more",
+ "enum_derives",
+ "futures 0.3.28",
+ "hex",
+ "hkdf",
+ "js-sys",
+ "mm2_core",
+ "mm2_db",
+ "mm2_err_handle",
+ "mm2_test_helpers",
+ "pairing_api",
+ "parking_lot",
+ "rand 0.8.5",
+ "relay_client",
+ "relay_rpc",
+ "secp256k1 0.20.3",
+ "serde",
+ "serde_json",
+ "sha2 0.10.7",
+ "thiserror",
+ "timed-map",
+ "tokio",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test",
+ "wc_common",
+ "web-sys",
+ "x25519-dalek 2.0.1",
+]
+
[[package]]
name = "keccak"
version = "0.1.0"
@@ -3049,9 +3078,9 @@ dependencies = [
name = "keys"
version = "0.1.0"
dependencies = [
- "base58",
"bech32",
"bitcrypto",
+ "bs58 0.4.0",
"derive_more",
"lazy_static",
"primitives",
@@ -3096,12 +3125,6 @@ version = "0.2.169"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
-[[package]]
-name = "libm"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
-
[[package]]
name = "libm"
version = "0.2.7"
@@ -3113,7 +3136,7 @@ name = "libp2p"
version = "0.52.1"
source = "git+https://github.com/KomodoPlatform/rust-libp2p.git?tag=k-0.52.12#8bcc1fda79d56a2f398df3d45a29729b8ce0148d"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"futures 0.3.28",
"futures-timer",
"getrandom 0.2.9",
@@ -3181,7 +3204,7 @@ dependencies = [
"parking_lot",
"pin-project",
"quick-protobuf",
- "rand 0.8.4",
+ "rand 0.8.5",
"rw-stream-sink",
"smallvec 1.6.1",
"thiserror",
@@ -3218,7 +3241,7 @@ dependencies = [
"log",
"quick-protobuf",
"quick-protobuf-codec",
- "rand 0.8.4",
+ "rand 0.8.5",
"smallvec 1.6.1",
"thiserror",
]
@@ -3231,7 +3254,7 @@ dependencies = [
"asynchronous-codec",
"base64 0.21.7",
"byteorder",
- "bytes 1.4.0",
+ "bytes",
"either",
"fnv",
"futures 0.3.28",
@@ -3246,7 +3269,7 @@ dependencies = [
"prometheus-client",
"quick-protobuf",
"quick-protobuf-codec",
- "rand 0.8.4",
+ "rand 0.8.5",
"regex",
"sha2 0.10.7",
"smallvec 1.6.1",
@@ -3283,12 +3306,12 @@ checksum = "d2874d9c6575f1d7a151022af5c42bb0ffdcdfbafe0a6fd039de870b384835a2"
dependencies = [
"asn1_der",
"bs58 0.5.0",
- "ed25519-dalek",
+ "ed25519-dalek 1.0.1",
"libsecp256k1",
"log",
"multihash",
"quick-protobuf",
- "rand 0.8.4",
+ "rand 0.8.5",
"sha2 0.10.7",
"thiserror",
"zeroize",
@@ -3306,7 +3329,7 @@ dependencies = [
"libp2p-identity",
"libp2p-swarm",
"log",
- "rand 0.8.4",
+ "rand 0.8.5",
"smallvec 1.6.1",
"socket2 0.5.3",
"tokio",
@@ -3335,7 +3358,7 @@ name = "libp2p-noise"
version = "0.43.0"
source = "git+https://github.com/KomodoPlatform/rust-libp2p.git?tag=k-0.52.12#8bcc1fda79d56a2f398df3d45a29729b8ce0148d"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"curve25519-dalek 3.2.0",
"futures 0.3.28",
"libp2p-core",
@@ -3345,12 +3368,12 @@ dependencies = [
"multihash",
"once_cell",
"quick-protobuf",
- "rand 0.8.4",
+ "rand 0.8.5",
"sha2 0.10.7",
"snow",
"static_assertions",
"thiserror",
- "x25519-dalek",
+ "x25519-dalek 1.1.0",
"zeroize",
]
@@ -3367,7 +3390,7 @@ dependencies = [
"libp2p-identity",
"libp2p-swarm",
"log",
- "rand 0.8.4",
+ "rand 0.8.5",
"void",
]
@@ -3383,7 +3406,7 @@ dependencies = [
"libp2p-identity",
"libp2p-swarm",
"log",
- "rand 0.8.4",
+ "rand 0.8.5",
"smallvec 1.6.1",
"void",
]
@@ -3404,7 +3427,7 @@ dependencies = [
"log",
"multistream-select",
"once_cell",
- "rand 0.8.4",
+ "rand 0.8.5",
"smallvec 1.6.1",
"tokio",
"void",
@@ -3415,11 +3438,11 @@ name = "libp2p-swarm-derive"
version = "0.33.0"
source = "git+https://github.com/KomodoPlatform/rust-libp2p.git?tag=k-0.52.12#8bcc1fda79d56a2f398df3d45a29729b8ce0148d"
dependencies = [
- "heck",
+ "heck 0.4.0",
"proc-macro-warning",
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -3497,7 +3520,7 @@ dependencies = [
"libsecp256k1-core",
"libsecp256k1-gen-ecmult",
"libsecp256k1-gen-genmult",
- "rand 0.8.4",
+ "rand 0.8.5",
"serde",
"sha2 0.9.9",
"typenum",
@@ -3791,8 +3814,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ddece26afd34c31585c74a4db0630c376df271c285d682d1e55012197830b6df"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -3852,7 +3875,7 @@ dependencies = [
[[package]]
name = "mm2_bin_lib"
-version = "2.4.0-beta"
+version = "2.5.0-beta"
dependencies = [
"chrono",
"common",
@@ -3890,6 +3913,7 @@ dependencies = [
"libp2p",
"mm2_err_handle",
"mm2_event_stream",
+ "mm2_io",
"mm2_metrics",
"mm2_rpc",
"primitives",
@@ -4038,7 +4062,7 @@ dependencies = [
"async-trait",
"bitcrypto",
"blake2",
- "bytes 0.4.12",
+ "bytes",
"cfg-if 1.0.0",
"chain",
"chrono",
@@ -4070,6 +4094,7 @@ dependencies = [
"instant",
"itertools",
"js-sys",
+ "kdf_walletconnect",
"keys",
"lazy_static",
"libc",
@@ -4118,6 +4143,7 @@ dependencies = [
"sp-runtime-interface",
"sp-trie",
"spv_validation",
+ "tempfile",
"testcontainers",
"timed-map",
"tokio",
@@ -4185,7 +4211,7 @@ dependencies = [
"async-stream",
"async-trait",
"base64 0.21.7",
- "bytes 1.4.0",
+ "bytes",
"cfg-if 1.0.0",
"common",
"derive_more",
@@ -4194,7 +4220,7 @@ dependencies = [
"futures-util",
"gstuff",
"http 0.2.12",
- "http-body 0.4.5",
+ "http-body",
"httparse",
"hyper",
"js-sys",
@@ -4264,7 +4290,6 @@ dependencies = [
"serde_json",
"sha2 0.10.7",
"smallvec 1.6.1",
- "syn 2.0.38",
"timed-map",
"tokio",
"void",
@@ -4303,7 +4328,7 @@ dependencies = [
name = "mm2_test_helpers"
version = "0.1.0"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"cfg-if 1.0.0",
"chrono",
"common",
@@ -4344,7 +4369,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3048ef3680533a27f9f8e7d6a0bce44dc61e4895ea0f42709337fa1c8616fefe"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -4399,7 +4424,7 @@ name = "multistream-select"
version = "0.13.0"
source = "git+https://github.com/KomodoPlatform/rust-libp2p.git?tag=k-0.52.12#8bcc1fda79d56a2f398df3d45a29729b8ce0148d"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"futures 0.3.28",
"log",
"pin-project",
@@ -4450,7 +4475,7 @@ version = "0.11.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b33524dc0968bfad349684447bfce6db937a9ac3332a1fe60c0c5a5ce63f21"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"futures 0.3.28",
"log",
"netlink-packet-core",
@@ -4465,7 +4490,7 @@ version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"futures 0.3.28",
"libc",
"log",
@@ -4530,8 +4555,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -4612,16 +4637,6 @@ dependencies = [
"num-traits",
]
-[[package]]
-name = "packed_simd_2"
-version = "0.3.8"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1914cd452d8fccd6f9db48147b29fd4ae05bea9dc5d9ad578509f72415de282"
-dependencies = [
- "cfg-if 1.0.0",
- "libm 0.1.4",
-]
-
[[package]]
name = "pairing"
version = "0.18.0"
@@ -4632,6 +4647,27 @@ dependencies = [
"group 0.8.0",
]
+[[package]]
+name = "pairing_api"
+version = "0.1.0"
+source = "git+https://github.com/komodoplatform/walletconnectrust?tag=k-0.1.3#e2fb03ac19186fd2372a0eef71897ef8a6ae9653"
+dependencies = [
+ "anyhow",
+ "chrono",
+ "hex",
+ "lazy_static",
+ "paste",
+ "rand 0.8.5",
+ "regex",
+ "relay_client",
+ "relay_rpc",
+ "serde",
+ "serde_json",
+ "thiserror",
+ "url",
+ "wc_common",
+]
+
[[package]]
name = "parity-scale-codec"
version = "3.1.2"
@@ -4654,7 +4690,7 @@ checksum = "c45ed1f39709f5a89338fab50e59816b2e8815f5bb58276e7ddf9afd495f73f8"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -4750,9 +4786,9 @@ dependencies = [
[[package]]
name = "paste"
-version = "1.0.7"
+version = "1.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc"
+checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
[[package]]
name = "peg"
@@ -4772,7 +4808,7 @@ checksum = "bdad6a1d9cf116a059582ce415d5f5566aabcd4008646779dab7fdc2a9a9d426"
dependencies = [
"peg-runtime",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
]
[[package]]
@@ -4822,8 +4858,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -4860,12 +4896,6 @@ version = "0.3.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964"
-[[package]]
-name = "platforms"
-version = "3.0.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e3d7ddaed09e0eb771a79ab0fd64609ba0afb0a8366421957936ad14cbd13630"
-
[[package]]
name = "polling"
version = "3.7.4"
@@ -4883,23 +4913,23 @@ dependencies = [
[[package]]
name = "poly1305"
-version = "0.7.0"
+version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fe800695325da85083cd23b56826fccb2e2dc29b218e7811a6f33bc93f414be"
+checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf"
dependencies = [
- "cpufeatures 0.1.4",
+ "cpufeatures",
"opaque-debug",
"universal-hash",
]
[[package]]
name = "polyval"
-version = "0.5.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e597450cbf209787f0e6de80bf3795c6b2356a380ee87837b545aded8dbc1823"
+checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25"
dependencies = [
"cfg-if 1.0.0",
- "cpufeatures 0.1.4",
+ "cpufeatures",
"opaque-debug",
"universal-hash",
]
@@ -4923,7 +4953,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d"
dependencies = [
"proc-macro2",
- "syn 2.0.38",
+ "syn 2.0.77",
]
[[package]]
@@ -4967,15 +4997,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70550716265d1ec349c41f70dd4f964b4fd88394efe4405f0c1da679c4799a07"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
name = "proc-macro2"
-version = "1.0.69"
+version = "1.0.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da"
+checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a"
dependencies = [
"unicode-ident",
]
@@ -4987,7 +5017,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78c2f43e8969d51935d2a7284878ae053ba30034cd563f673cde37ba5205685e"
dependencies = [
"dtoa",
- "itoa 1.0.10",
+ "itoa",
"parking_lot",
"prometheus-client-derive-encode",
]
@@ -4999,7 +5029,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b6a5217beb0ad503ee7fa752d451c905113d70721b937126158f3106a48cc1"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -5009,7 +5039,7 @@ version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"prost-derive",
]
@@ -5019,8 +5049,8 @@ version = "0.12.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4"
dependencies = [
- "bytes 1.4.0",
- "heck",
+ "bytes",
+ "heck 0.5.0",
"itertools",
"log",
"multimap",
@@ -5030,7 +5060,7 @@ dependencies = [
"prost",
"prost-types",
"regex",
- "syn 2.0.38",
+ "syn 2.0.77",
"tempfile",
]
@@ -5043,8 +5073,8 @@ dependencies = [
"anyhow",
"itertools",
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -5130,7 +5160,7 @@ version = "0.2.0"
source = "git+https://github.com/KomodoPlatform/rust-libp2p.git?tag=k-0.52.12#8bcc1fda79d56a2f398df3d45a29729b8ce0148d"
dependencies = [
"asynchronous-codec",
- "bytes 1.4.0",
+ "bytes",
"quick-protobuf",
"thiserror",
"unsigned-varint",
@@ -5155,9 +5185,9 @@ checksum = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a"
[[package]]
name = "quote"
-version = "1.0.33"
+version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
+checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@@ -5225,14 +5255,13 @@ dependencies = [
[[package]]
name = "rand"
-version = "0.8.4"
+version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8"
+checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
dependencies = [
"libc",
"rand_chacha 0.3.1",
"rand_core 0.6.4",
- "rand_hc 0.3.1",
]
[[package]]
@@ -5316,15 +5345,6 @@ dependencies = [
"rand_core 0.5.1",
]
-[[package]]
-name = "rand_hc"
-version = "0.3.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7"
-dependencies = [
- "rand_core 0.6.4",
-]
-
[[package]]
name = "rand_isaac"
version = "0.1.1"
@@ -5470,7 +5490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c523ccaed8ac4b0288948849a350b37d3035827413c458b6a40ddb614bb4f72"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -5491,6 +5511,61 @@ version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "436b050e76ed2903236f032a59761c1eb99e1b0aead2c257922771dab1fc8c78"
+[[package]]
+name = "relay_client"
+version = "0.1.0"
+source = "git+https://github.com/komodoplatform/walletconnectrust?tag=k-0.1.3#e2fb03ac19186fd2372a0eef71897ef8a6ae9653"
+dependencies = [
+ "chrono",
+ "data-encoding",
+ "futures-util",
+ "getrandom 0.2.9",
+ "http 1.1.0",
+ "js-sys",
+ "pin-project",
+ "rand 0.8.5",
+ "relay_rpc",
+ "serde",
+ "serde_json",
+ "serde_qs",
+ "thiserror",
+ "tokio",
+ "tokio-tungstenite-wasm",
+ "tokio-util",
+ "url",
+ "wasm-bindgen",
+ "wasm-bindgen-futures",
+ "wasm-bindgen-test",
+ "web-sys",
+]
+
+[[package]]
+name = "relay_rpc"
+version = "0.1.0"
+source = "git+https://github.com/komodoplatform/walletconnectrust?tag=k-0.1.3#e2fb03ac19186fd2372a0eef71897ef8a6ae9653"
+dependencies = [
+ "anyhow",
+ "bs58 0.4.0",
+ "chrono",
+ "data-encoding",
+ "derive_more",
+ "ed25519-dalek 2.1.1",
+ "getrandom 0.2.9",
+ "hex",
+ "jsonwebtoken",
+ "once_cell",
+ "paste",
+ "rand 0.8.5",
+ "regex",
+ "serde",
+ "serde-aux",
+ "serde_json",
+ "sha2 0.10.7",
+ "strum",
+ "thiserror",
+ "url",
+]
+
[[package]]
name = "reqwest"
version = "0.11.9"
@@ -5498,13 +5573,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525"
dependencies = [
"base64 0.13.0",
- "bytes 1.4.0",
+ "bytes",
"encoding_rs",
"futures-core",
"futures-util",
"h2",
"http 0.2.12",
- "http-body 0.4.5",
+ "http-body",
"hyper",
"hyper-rustls 0.23.0",
"ipnet",
@@ -5604,7 +5679,7 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"rustc-hex",
]
@@ -5913,7 +5988,7 @@ checksum = "50e334bb10a245e28e5fd755cabcafd96cfcd167c99ae63a46924ca8d8703a3c"
dependencies = [
"proc-macro-crate",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -6097,20 +6172,30 @@ name = "ser_error_derive"
version = "0.1.0"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"ser_error",
"syn 1.0.95",
]
[[package]]
name = "serde"
-version = "1.0.189"
+version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e422a44e74ad4001bdc8eede9a4570ab52f71190e9c076d14369f38b9200537"
+checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a"
dependencies = [
"serde_derive",
]
+[[package]]
+name = "serde-aux"
+version = "4.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d2e8bfba469d06512e11e3311d4d051a4a387a5b42d010404fecf3200321c95"
+dependencies = [
+ "serde",
+ "serde_json",
+]
+
[[package]]
name = "serde-wasm-bindgen"
version = "0.4.3"
@@ -6133,27 +6218,39 @@ dependencies = [
[[package]]
name = "serde_derive"
-version = "1.0.189"
+version = "1.0.210"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1e48d1f918009ce3145511378cf68d613e3b3d9137d67272562080d68a2b32d5"
+checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
name = "serde_json"
-version = "1.0.79"
+version = "1.0.125"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95"
+checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed"
dependencies = [
- "indexmap 1.9.3",
- "itoa 1.0.10",
+ "indexmap 2.2.3",
+ "itoa",
+ "memchr",
"ryu",
"serde",
]
+[[package]]
+name = "serde_qs"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8cac3f1e2ca2fe333923a1ae72caca910b98ed0630bb35ef6f8c8517d6e81afa"
+dependencies = [
+ "percent-encoding",
+ "serde",
+ "thiserror",
+]
+
[[package]]
name = "serde_repr"
version = "0.1.6"
@@ -6161,7 +6258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -6181,7 +6278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
dependencies = [
"form_urlencoded",
- "itoa 1.0.10",
+ "itoa",
"ryu",
"serde",
]
@@ -6204,7 +6301,7 @@ checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082"
dependencies = [
"darling",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -6235,7 +6332,7 @@ checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6"
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
- "cpufeatures 0.2.11",
+ "cpufeatures",
"digest 0.9.0",
"opaque-debug",
]
@@ -6247,7 +6344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba"
dependencies = [
"cfg-if 1.0.0",
- "cpufeatures 0.2.11",
+ "cpufeatures",
"digest 0.10.7",
]
@@ -6259,7 +6356,7 @@ checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800"
dependencies = [
"block-buffer 0.9.0",
"cfg-if 1.0.0",
- "cpufeatures 0.2.11",
+ "cpufeatures",
"digest 0.9.0",
"opaque-debug",
]
@@ -6271,7 +6368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
dependencies = [
"cfg-if 1.0.0",
- "cpufeatures 0.2.11",
+ "cpufeatures",
"digest 0.10.7",
]
@@ -6313,7 +6410,7 @@ dependencies = [
"blake2b_simd",
"chrono",
"derive_more",
- "ed25519-dalek",
+ "ed25519-dalek 1.0.1",
"hex",
"nom",
"reqwest",
@@ -6335,9 +6432,9 @@ dependencies = [
[[package]]
name = "signature"
-version = "1.4.0"
+version = "1.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02658e48d89f2bec991f9a78e69cfa4c316f8d6a6c4ec12fae1aeb263d486788"
+checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c"
[[package]]
name = "signature"
@@ -6349,6 +6446,18 @@ dependencies = [
"rand_core 0.6.4",
]
+[[package]]
+name = "simple_asn1"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085"
+dependencies = [
+ "num-bigint",
+ "num-traits",
+ "thiserror",
+ "time 0.3.20",
+]
+
[[package]]
name = "siphasher"
version = "0.1.3"
@@ -6408,16 +6517,16 @@ dependencies = [
[[package]]
name = "snow"
-version = "0.9.2"
+version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ccba027ba85743e09d15c03296797cad56395089b832b48b5a5217880f57733"
+checksum = "850948bee068e713b8ab860fe1adc4d109676ab4c3b621fd8147f06b261f2f85"
dependencies = [
"aes-gcm",
"blake2",
"chacha20poly1305",
- "curve25519-dalek 4.0.0-rc.1",
+ "curve25519-dalek 4.1.3",
"rand_core 0.6.4",
- "ring 0.16.20",
+ "ring 0.17.3",
"rustc_version 0.4.0",
"sha2 0.10.7",
"subtle",
@@ -6461,11 +6570,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "083624472e8817d44d02c0e55df043737ff11f279af924abdf93845717c2b75c"
dependencies = [
"base64 0.13.0",
- "bytes 1.4.0",
+ "bytes",
"futures 0.3.28",
"httparse",
"log",
- "rand 0.8.4",
+ "rand 0.8.5",
"sha-1",
]
@@ -6501,7 +6610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d676664972e22a0796176e81e7bec41df461d1edf52090955cdab55f2c956ff2"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -6531,7 +6640,7 @@ dependencies = [
"Inflector",
"proc-macro-crate",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
]
@@ -6652,7 +6761,7 @@ checksum = "2f9799e6d412271cb2414597581128b03f3285f260ea49f5363d07df6a332b3e"
dependencies = [
"Inflector",
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"serde",
"serde_json",
"unicode-xid 0.2.0",
@@ -6670,6 +6779,28 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+[[package]]
+name = "strum"
+version = "0.26.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06"
+dependencies = [
+ "strum_macros",
+]
+
+[[package]]
+name = "strum_macros"
+version = "0.26.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be"
+dependencies = [
+ "heck 0.5.0",
+ "proc-macro2",
+ "quote 1.0.37",
+ "rustversion",
+ "syn 2.0.77",
+]
+
[[package]]
name = "subtle"
version = "2.4.0"
@@ -6709,18 +6840,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbaf6116ab8924f39d52792136fb74fd60a80194cf1b1c6ffa6453eef1c3f942"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"unicode-ident",
]
[[package]]
name = "syn"
-version = "2.0.38"
+version = "2.0.77"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b"
+checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"unicode-ident",
]
@@ -6746,7 +6877,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
"unicode-xid 0.2.0",
]
@@ -6797,7 +6928,7 @@ version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43f8a10105d0a7c4af0a242e23ed5a12519afe5cc0e68419da441bb5981a6802"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"digest 0.10.7",
"ed25519 2.2.3",
"ed25519-consensus",
@@ -6842,7 +6973,7 @@ version = "0.35.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff525d5540a9fc535c38dc0d92a98da3ee36fcdfbda99cecb9f3cce5cd4d41d7"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"flex-error",
"num-derive",
"num-traits",
@@ -6861,12 +6992,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2d8fe61b1772cd50038bdeeadf53773bb37a09e639dd8e6d996668fd220ddb29"
dependencies = [
"async-trait",
- "bytes 1.4.0",
+ "bytes",
"flex-error",
"getrandom 0.2.9",
"peg",
"pin-project",
- "rand 0.8.4",
+ "rand 0.8.5",
"semver 1.0.6",
"serde",
"serde_bytes",
@@ -6910,7 +7041,7 @@ dependencies = [
"hex",
"hmac 0.12.1",
"log",
- "rand 0.8.4",
+ "rand 0.8.5",
"serde",
"serde_json",
"sha2 0.10.7",
@@ -6932,8 +7063,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -6952,7 +7083,7 @@ version = "0.3.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
dependencies = [
- "itoa 1.0.10",
+ "itoa",
"js-sys",
"serde",
"time-core",
@@ -6976,11 +7107,12 @@ dependencies = [
[[package]]
name = "timed-map"
-version = "1.3.0"
+version = "1.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30565aee368a9b233f397f46cd803c59285b61d54c5b3ae378611bd467beecbe"
+checksum = "6f664a6b916d03d3e32c312c3b6ce31c24697c0f7ea6d87e20eb6372053ddf29"
dependencies = [
"rustc-hash",
+ "serde",
"web-time",
]
@@ -7024,7 +7156,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2"
dependencies = [
"autocfg 1.1.0",
- "bytes 1.4.0",
+ "bytes",
"libc",
"mio",
"num_cpus",
@@ -7035,16 +7167,6 @@ dependencies = [
"windows-sys 0.48.0",
]
-[[package]]
-name = "tokio-buf"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46"
-dependencies = [
- "bytes 0.4.12",
- "futures 0.1.29",
-]
-
[[package]]
name = "tokio-io-timeout"
version = "1.2.0"
@@ -7062,8 +7184,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -7117,7 +7239,7 @@ dependencies = [
[[package]]
name = "tokio-tungstenite-wasm"
version = "0.1.1-alpha.0"
-source = "git+https://github.com/KomodoPlatform/tokio-tungstenite-wasm?rev=d20abdb#d20abdbbb2f03e302e3a8d11a1736ec8b50d0f58"
+source = "git+https://github.com/KomodoPlatform/tokio-tungstenite-wasm?rev=8fc7e2f#8fc7e2ff4c970bee0c0867399cb9a941881ea183"
dependencies = [
"futures-channel",
"futures-util",
@@ -7137,7 +7259,7 @@ version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f988a1a1adc2fb21f9c12aa96441da33a1728193ae0b95d2be22dbd17fcb4e5c"
dependencies = [
- "bytes 1.4.0",
+ "bytes",
"futures-core",
"futures-sink",
"pin-project-lite 0.2.9",
@@ -7198,11 +7320,11 @@ dependencies = [
"async-trait",
"axum",
"base64 0.21.7",
- "bytes 1.4.0",
+ "bytes",
"flate2",
"h2",
"http 0.2.12",
- "http-body 0.4.5",
+ "http-body",
"hyper",
"hyper-timeout",
"percent-encoding",
@@ -7229,8 +7351,8 @@ dependencies = [
"prettyplease",
"proc-macro2",
"prost-build",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -7244,7 +7366,7 @@ dependencies = [
"indexmap 1.9.3",
"pin-project",
"pin-project-lite 0.2.9",
- "rand 0.8.4",
+ "rand 0.8.5",
"slab",
"tokio",
"tokio-util",
@@ -7284,8 +7406,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
]
[[package]]
@@ -7392,7 +7514,7 @@ dependencies = [
"idna 0.2.3",
"ipnet",
"lazy_static",
- "rand 0.8.4",
+ "rand 0.8.5",
"smallvec 1.6.1",
"socket2 0.4.9",
"thiserror",
@@ -7436,11 +7558,11 @@ checksum = "6ad3713a14ae247f22a728a0456a545df14acf3867f905adff84be99e23b3ad1"
dependencies = [
"base64 0.13.0",
"byteorder",
- "bytes 1.4.0",
+ "bytes",
"http 0.2.12",
"httparse",
"log",
- "rand 0.8.4",
+ "rand 0.8.5",
"rustls 0.20.4",
"sha-1",
"thiserror",
@@ -7451,9 +7573,9 @@ dependencies = [
[[package]]
name = "typenum"
-version = "1.15.0"
+version = "1.17.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987"
+checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
[[package]]
name = "uint"
@@ -7513,11 +7635,11 @@ checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"
[[package]]
name = "universal-hash"
-version = "0.4.0"
+version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402"
+checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea"
dependencies = [
- "generic-array",
+ "crypto-common",
"subtle",
]
@@ -7528,7 +7650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d86a8dc7f45e4c1b0d30e43038c38f274e77af056aa5f74b93c2cf9eb3c1c836"
dependencies = [
"asynchronous-codec",
- "bytes 1.4.0",
+ "bytes",
]
[[package]]
@@ -7586,7 +7708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314"
dependencies = [
"getrandom 0.2.9",
- "rand 0.8.4",
+ "rand 0.8.5",
"serde",
]
@@ -7723,8 +7845,8 @@ dependencies = [
"log",
"once_cell",
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
"wasm-bindgen-shared",
]
@@ -7746,7 +7868,7 @@ version = "0.2.87"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d"
dependencies = [
- "quote 1.0.33",
+ "quote 1.0.37",
"wasm-bindgen-macro-support",
]
@@ -7757,8 +7879,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
- "syn 2.0.38",
+ "quote 1.0.37",
+ "syn 2.0.77",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -7790,7 +7912,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2c2e18093f11c19ca4e188c177fecc7c372304c311189f12c2f9bea5b7324ac7"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
+]
+
+[[package]]
+name = "wc_common"
+version = "0.1.0"
+source = "git+https://github.com/komodoplatform/walletconnectrust?tag=k-0.1.3#e2fb03ac19186fd2372a0eef71897ef8a6ae9653"
+dependencies = [
+ "base64 0.21.7",
+ "chacha20poly1305",
+ "thiserror",
]
[[package]]
@@ -7816,11 +7948,11 @@ dependencies = [
[[package]]
name = "web3"
version = "0.19.0"
-source = "git+https://github.com/KomodoPlatform/rust-web3?tag=v0.20.0#01de1d732e61c920cfb2fb1533db7d7110c8a457"
+source = "git+https://github.com/komodoplatform/rust-web3?tag=v0.20.0#01de1d732e61c920cfb2fb1533db7d7110c8a457"
dependencies = [
"arrayvec 0.7.1",
"base64 0.13.0",
- "bytes 1.4.0",
+ "bytes",
"derive_more",
"ethabi",
"ethereum-types",
@@ -7835,7 +7967,7 @@ dependencies = [
"log",
"parking_lot",
"pin-project",
- "rand 0.8.4",
+ "rand 0.8.5",
"reqwest",
"rlp",
"serde",
@@ -8263,6 +8395,18 @@ dependencies = [
"zeroize",
]
+[[package]]
+name = "x25519-dalek"
+version = "2.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277"
+dependencies = [
+ "curve25519-dalek 4.1.3",
+ "rand_core 0.6.4",
+ "serde",
+ "zeroize",
+]
+
[[package]]
name = "yamux"
version = "0.12.1"
@@ -8274,7 +8418,7 @@ dependencies = [
"nohash-hasher",
"parking_lot",
"pin-project",
- "rand 0.8.4",
+ "rand 0.8.5",
"static_assertions",
]
@@ -8290,7 +8434,7 @@ dependencies = [
"nohash-hasher",
"parking_lot",
"pin-project",
- "rand 0.8.4",
+ "rand 0.8.5",
"static_assertions",
]
@@ -8312,7 +8456,7 @@ checksum = "0f9079049688da5871a7558ddacb7f04958862c703e68258594cb7a862b5e33f"
[[package]]
name = "zcash_client_backend"
version = "0.5.0"
-source = "git+https://github.com/KomodoPlatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
+source = "git+https://github.com/komodoplatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
dependencies = [
"async-trait",
"base64 0.13.0",
@@ -8337,7 +8481,7 @@ dependencies = [
[[package]]
name = "zcash_client_sqlite"
version = "0.3.0"
-source = "git+https://github.com/KomodoPlatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
+source = "git+https://github.com/komodoplatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
dependencies = [
"async-trait",
"bech32",
@@ -8359,7 +8503,7 @@ dependencies = [
[[package]]
name = "zcash_extras"
version = "0.1.0"
-source = "git+https://github.com/KomodoPlatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
+source = "git+https://github.com/komodoplatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
dependencies = [
"async-trait",
"ff 0.8.0",
@@ -8375,7 +8519,7 @@ dependencies = [
[[package]]
name = "zcash_note_encryption"
version = "0.0.0"
-source = "git+https://github.com/KomodoPlatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
+source = "git+https://github.com/komodoplatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
dependencies = [
"blake2b_simd",
"byteorder",
@@ -8389,9 +8533,9 @@ dependencies = [
[[package]]
name = "zcash_primitives"
version = "0.5.0"
-source = "git+https://github.com/KomodoPlatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
+source = "git+https://github.com/komodoplatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
dependencies = [
- "aes 0.8.3",
+ "aes",
"bitvec 0.18.5",
"blake2b_simd",
"blake2s_simd",
@@ -8419,7 +8563,7 @@ dependencies = [
[[package]]
name = "zcash_proofs"
version = "0.5.0"
-source = "git+https://github.com/KomodoPlatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
+source = "git+https://github.com/komodoplatform/librustzcash.git?tag=k-1.4.2#4e030a0f44cc17f100bf5f019563be25c5b8755f"
dependencies = [
"bellman",
"blake2b_simd",
@@ -8450,7 +8594,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f8f187641dad4f680d25c4bfc4225b418165984179f26ca76ec4fb6441d3a17"
dependencies = [
"proc-macro2",
- "quote 1.0.33",
+ "quote 1.0.37",
"syn 1.0.95",
"synstructure",
]
diff --git a/Cargo.toml b/Cargo.toml
index 507c2e5c31..dd317f0d87 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,4 +1,6 @@
[workspace]
+# https://doc.rust-lang.org/beta/cargo/reference/features.html#feature-resolver-version-2
+resolver = "2"
members = [
"mm2src/coins_activation",
"mm2src/coins",
@@ -10,6 +12,7 @@ members = [
"mm2src/derives/ser_error_derive",
"mm2src/derives/ser_error",
"mm2src/hw_common",
+ "mm2src/kdf_walletconnect",
"mm2src/mm2_bin_lib",
"mm2src/mm2_bitcoin/chain",
"mm2src/mm2_bitcoin/crypto",
@@ -47,8 +50,187 @@ exclude = [
"mm2src/mm2_test_helpers",
]
-# https://doc.rust-lang.org/beta/cargo/reference/features.html#feature-resolver-version-2
-resolver = "2"
+[workspace.dependencies]
+aes = "0.8.3"
+argon2 = { version = "0.5.2", features = ["zeroize"] }
+arrayref = "0.3"
+anyhow = "1.0.89"
+async-std = "1.5"
+async-trait = "0.1.52"
+async-stream = "0.3"
+backtrace = "0.3"
+base64 = "0.21.2"
+bech32 = "0.9.1"
+bs58 = "0.4.0"
+bigdecimal = { version = "0.3", features = ["serde"] }
+bip32 = { version = "0.2.2", default-features = false, features = ["alloc", "secp256k1-ffi"] }
+bip39 = { version = "2.0.0", features = ["rand_core", "zeroize"], default-features = false }
+bitcoin = "0.29"
+bitcoin_hashes = "0.11"
+blake2 = "0.10.6"
+blake2b_simd = "0.5.10"
+bytes = "1.1"
+byteorder = "1.3"
+cbc = "0.1.2"
+cc = "1.0"
+cipher = "0.4.4"
+chrono = "0.4.23"
+cfg-if = "1.0"
+clap = { version = "4.2", features = ["derive"] }
+cosmrs = { version = "0.16", default-features = false }
+crossbeam = "0.8"
+crossbeam-channel = "0.5.1"
+compatible-time = { version = "1.1.0", package = "web-time" }
+crc32fast = { version = "1.3.2", features = ["std", "nightly"] }
+derive_more = "0.99"
+directories = "5.0"
+dirs = "1"
+ed25519-dalek = { version = "1.0.1", features = ["serde"] }
+either = "1.6"
+enum-primitive-derive = "0.2"
+env_logger = "0.9.3"
+ethabi = "17.0.0"
+ethcore-transaction = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
+ethereum-types = { version = "0.13", default-features = false, features = ["std", "serialize"] }
+ethkey = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
+# Waiting for https://github.com/rust-lang/rust/issues/54725 to use on Stable.
+#enum_dispatch = "0.1"
+ff = "0.8"
+findshlibs = "0.5"
+# using select macro requires the crate to be named futures, compilation failed with futures03 name
+futures = { version = "0.3.1", default-features = false }
+futures01 = { version = "0.1", package = "futures" }
+futures-rustls = { version = "0.24", default-features = false }
+futures-ticker = "0.0.3"
+futures-timer = "3.0"
+futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] }
+fnv = "1.0.6"
+group = "0.8.0"
+gstuff = { version = "0.7", features = ["nightly"] }
+hash256-std-hasher = "0.15.2"
+hash-db = "0.15.2"
+hex = "0.4.2"
+hmac = "0.12.1"
+hkdf = "0.12.4"
+http = "0.2"
+http-body = "0.4"
+httparse = "1.8.0"
+hyper = "0.14.26"
+hyper-rustls = { version = "0.24", default-features = false }
+indexmap = "1.7.0"
+inquire = "0.6"
+itertools = "0.10"
+jemallocator = "0.5.0"
+jubjub = "0.5.1"
+js-sys = "0.3.27"
+# Same version as `web3` depends on.
+jsonrpc-core = "18.0.0"
+lazy_static = "1.4"
+libc = "0.2"
+libp2p = { git = "https://github.com/KomodoPlatform/rust-libp2p.git", tag = "k-0.52.12", default-features = false }
+lightning = "0.0.113"
+lightning-background-processor = "0.0.113"
+lightning-invoice = { version = "0.21.0", features = ["serde"] }
+lightning-net-tokio = "0.0.113"
+instant = "0.1.12"
+log = "0.4"
+metrics = "0.21"
+metrics-exporter-prometheus = "0.12.1"
+metrics-util = "0.15"
+mocktopus = "0.8.0"
+nom = "6.1.2"
+num-bigint = { version = "0.4", features = ["serde", "std"] }
+num-rational = { version = "0.4", features = ["serde"] }
+parity-util-mem = "0.11"
+num-traits = "0.2"
+pairing_api = { git = "https://github.com/komodoplatform/walletconnectrust", tag = "k-0.1.3" }
+parking_lot = { version = "0.12.0", default-features = false }
+parking_lot_core = { version = "0.6", features = ["nightly"] }
+passwords = "3.1"
+paste = "1.0"
+pin-project = "1.1.2"
+primitive-types = "0.11.1"
+prost = "0.12"
+prost-build = { version = "0.12", default-features = false }
+protobuf = "2.20"
+proc-macro2 = "1.0"
+quote = "1.0"
+regex = "1"
+relay_client = { git = "https://github.com/komodoplatform/walletconnectrust", tag = "k-0.1.3" }
+relay_rpc = { git = "https://github.com/komodoplatform/walletconnectrust", tag = "k-0.1.3" }
+reqwest = { version = "0.11.9", default-features = false, features = ["json"] }
+rand = { version = "0.7", default-features = false, features = ["std", "small_rng", "wasm-bindgen"] }
+rcgen = "0.10"
+ripemd160 = "0.9.0"
+rlp = "0.5"
+rmp-serde = "0.14.3"
+rusb = { version = "0.7.0", features = ["vendored"] }
+rustc-hash = "2.0"
+rustc-hex = "2"
+rust-ini = "0.13"
+rustls = { version = "0.21", default-features = false }
+rustls-pemfile = "1.0.2"
+rusqlite = { version = "0.28", features = ["bundled"] }
+secp256k1 = "0.20"
+secp256k1v24 = { version = "0.24", package = "secp256k1" }
+serde = { version = "1", default-features = false }
+serde_bytes = "0.11.5"
+serde_derive = { version = "1", default-features = false }
+serde_json = { version = "1", features = ["preserve_order", "raw_value"] }
+serde_with = "1.14.0"
+serde_repr = "0.1.6"
+serde-wasm-bindgen = "0.4.3"
+sha-1 = "0.9"
+sha2 = "0.10"
+sha3 = "0.9"
+sia-rust = { git = "https://github.com/KomodoPlatform/sia-rust", rev = "9f188b80b3213bcb604e7619275251ce08fae808" }
+siphasher = "0.1.1"
+smallvec = "1.6.1"
+sp-runtime-interface = { version = "6.0.0", default-features = false, features = ["disable_target_static_assertions"] }
+sp-trie = { version = "6.0", default-features = false }
+sql-builder = "3.1.1"
+syn = "1.0"
+sysinfo = "0.28"
+tempfile = "3.4.0"
+# using the same version as cosmrs
+tendermint-rpc = { version = "0.35", default-features = false }
+testcontainers = "0.15.0"
+tiny-bip39 = "0.8.0"
+thiserror = "1.0.40"
+time = "0.3.20"
+timed-map = { version = "1.4", features = ["rustc-hash", "serde", "wasm"] }
+tokio = { version = "1.20", default-features = false }
+tokio-rustls = { version = "0.24", default-features = false }
+tokio-tungstenite-wasm = { git = "https://github.com/KomodoPlatform/tokio-tungstenite-wasm", rev = "8fc7e2f", defautl-features = false, features = ["rustls-tls-native-roots"]}
+tonic = { version = "0.10", default-features = false }
+tonic-build = { version = "0.10", default-features = false, features = ["prost"] }
+tower-service = "0.3"
+trie-db = { version = "0.23.1", default-features = false }
+trie-root = "0.16.0"
+url = { version = "2.2.2", features = ["serde"] }
+uint = "0.9.3"
+uuid = { version = "1.2.2", features = ["fast-rng", "serde", "v4"] }
+void = "1.0"
+wagyu-zcash-parameters = { version = "0.2" }
+wasm-bindgen = "0.2.86"
+wasm-bindgen-futures = "0.4.21"
+wasm-bindgen-test = "0.3.2"
+wc_common = { git = "https://github.com/komodoplatform/walletconnectrust", tag = "k-0.1.3" }
+webpki-roots = "0.25"
+web-sys = {version = "0.3.55", default-features = false }
+# we don't need the default web3 features at all since we added our own web3 transport using shared httparse.workspace = true instance.
+# one of web3 dependencies is the old `tokio-uds 0.1.7` which fails cross-compiling to arm.
+# we don't need the default web3 features at all since we added our own web3 transport using shared hyper instance.
+web3 = { git = "https://github.com/komodoplatform/rust-web3", tag = "v0.20.0", default-features = false }
+winapi = "0.3"
+zbase32 = "0.1.2"
+zcash_client_backend = { git = "https://github.com/komodoplatform/librustzcash.git", tag = "k-1.4.2" }
+zcash_client_sqlite = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2" }
+zcash_extras = { git = "https://github.com/komodoplatform/librustzcash.git", tag = "k-1.4.2" }
+zcash_primitives = { git = "https://github.com/komodoplatform/librustzcash.git", tag = "k-1.4.2", features = ["transparent-inputs"] }
+zcash_proofs = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2", default-features = false }
+x25519-dalek = { version = "2.0", features = ["static_secrets"] }
+zeroize = { version = "1.5", features = ["zeroize_derive"] }
[profile.release]
debug = 0
diff --git a/README.md b/README.md
index 441c23ba8c..6b67fc4086 100755
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-
+
@@ -37,6 +37,7 @@
+
@@ -48,13 +49,13 @@
## What is the Komodo DeFi Framework?
-The Komodo DeFi Framework is open-source [atomic-swap](https://komodoplatform.com/en/academy/atomic-swaps/) software for seamless, decentralized, peer to peer trading between almost every blockchain asset in existence. This software works with propagation of orderbooks and swap states through the [libp2p](https://libp2p.io/) protocol and uses [Hash Time Lock Contracts (HTLCs)](https://en.bitcoinwiki.org/wiki/Hashed_Timelock_Contracts) for ensuring that the two parties in a swap either mutually complete a trade, or funds return to thier original owner.
+The Komodo DeFi Framework is open-source [atomic-swap](https://komodoplatform.com/en/docs/komodo-defi-framework/tutorials/#technical-comparisons) software for seamless, decentralized, peer to peer trading between almost every blockchain asset in existence. This software works with propagation of orderbooks and swap states through the [libp2p](https://libp2p.io/) protocol and uses [Hash Time Lock Contracts (HTLCs)](https://en.bitcoinwiki.org/wiki/Hashed_Timelock_Contracts) for ensuring that the two parties in a swap either mutually complete a trade, or funds return to thier original owner.
There is no 3rd party intermediary, no proxy tokens, and at all times users remain in sole possession of their private keys.
-A [well documented API](https://developers.komodoplatform.com/basic-docs/atomicdex/introduction-to-atomicdex.html) offers simple access to the underlying services using simple language agnostic JSON structured methods and parameters such that users can communicate with the core in a variety of methods such as [curl](https://developers.komodoplatform.com/basic-docs/atomicdex-api-legacy/buy.html) in CLI, or fully functioning [desktop and mobile applications](https://atomicdex.io/) like [Komodo Wallet Desktop](https://github.com/KomodoPlatform/komodo-wallet-desktop).
+A [well documented API](https://komodoplatform.com/en/docs/komodo-defi-framework/tutorials/) offers simple access to the underlying services using simple language agnostic JSON structured methods and parameters such that users can communicate with the core in a variety of methods such as [curl](https://komodoplatform.com/en/docs/komodo-defi-framework/api/legacy/buy/) in CLI, or fully functioning [browser, desktop and mobile wallet apps](https://komodoplatform.com/en/downloads/) like [Komodo Wallet](https://github.com/KomodoPlatform/komodo-wallet).
-For a curated list of Komodo DeFi Framework based projects and resources, check out [Awesome AtomicDEX](https://github.com/KomodoPlatform/awesome-atomicdex).
+For a curated list of Komodo DeFi Framework based projects and resources, check out [Awesome KomoDeFi]( https://github.com/KomodoPlatform/awesome-komodefi).
## Features
@@ -62,13 +63,13 @@ For a curated list of Komodo DeFi Framework based projects and resources, check
- Perform blockchain transactions without a local native chain (e.g. via Electrum servers)
- Query orderbooks for all pairs within the [supported coins](https://github.com/KomodoPlatform/coins/blob/master/coins)
- Buy/sell from the orderbook, or create maker orders
-- Configure automated ["makerbot" trading](https://developers.komodoplatform.com/basic-docs/atomicdex-api-20/start_simple_market_maker_bot.html) with periodic price updates and optional [telegram](https://telegram.org/) alerts
+- Configure automated ["makerbot" trading](https://komodoplatform.com/en/docs/komodo-defi-framework/api/v20/swaps_and_orders/start_simple_market_maker_bot/) with periodic price updates and optional [telegram](https://telegram.org/) alerts
## Building from source
### On Host System:
-[Pre-built release binaries](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/get-started-atomicdex.html) are available for OSX, Linux or Windows.
+[Pre-built release binaries](https://github.com/KomodoPlatform/komodo-defi-framework/releases) are available for Android, iOS, OSX, Linux, Windows and WASM.
If you want to build from source, the following prerequisites are required:
- [Rustup](https://rustup.rs/)
@@ -80,7 +81,7 @@ If you want to build from source, the following prerequisites are required:
To build, run `cargo build` (or `cargo build -vv` to get verbose build output).
-For more detailed instructions, please refer to the [Installation Guide](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/get-started-atomicdex.html).
+For more detailed instructions, please refer to the [Installation Guide](https://komodoplatform.com/en/docs/komodo-defi-framework/setup/).
### From Container:
@@ -100,6 +101,8 @@ docker run -v "$(pwd)":/app -w /app kdf-build-container cargo build
Just like building it on your host system, you will now have the target directory containing the build files.
+Alternatively, container images are available on [DockerHub](https://hub.docker.com/r/komodoofficial/komodo-defi-framework)
+
## Building WASM binary
Please refer to the [WASM Build Guide](./docs/WASM_BUILD.md).
@@ -108,7 +111,7 @@ Please refer to the [WASM Build Guide](./docs/WASM_BUILD.md).
Basic config is contained in two files, `MM2.json` and `coins`
-The user configuration [MM2.json file](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/configure-mm2-json.html) contains rpc credentials, your mnemonic seed phrase, a `netid` (8762 is the current main network) and some extra [optional parameters](https://developers.komodoplatform.com/basic-docs/atomicdex/atomicdex-setup/get-started-atomicdex.html).
+The user configuration `MM2.json` file contains rpc credentials, your mnemonic seed phrase, a `netid` (8762 is the current main network) and some extra [optional parameters](https://komodoplatform.com/en/docs/komodo-defi-framework/setup/configure-mm2-json/).
For example:
```json
@@ -116,7 +119,8 @@ For example:
"gui": "core_readme",
"netid": 8762,
"rpc_password": "Ent3r_Un1Qu3_Pa$$w0rd",
- "passphrase": "ENTER_UNIQUE_SEED_PHRASE_DONT_USE_THIS_CHANGE_IT_OR_FUNDS_NOT_SAFU"
+ "passphrase": "ENTER_UNIQUE_SEED_PHRASE_DONT_USE_THIS_CHANGE_IT_OR_FUNDS_NOT_SAFU",
+ "seednodes": ["example-seed-address1.com", "example-seed-address2.com", "example-seed-address3.com", "example-seed-address4.com"]
}
```
@@ -167,7 +171,7 @@ curl --url "http://127.0.0.1:7783" --data '{
}'
```
-Refer to the [Komodo Developer Docs](https://developers.komodoplatform.com/basic-docs/atomicdex/introduction-to-atomicdex.html) for details of additional RPC methods and parameters
+Refer to the [Komodo Developer Docs](https://komodoplatform.com/en/docs/komodo-defi-framework/api/) for details of additional RPC methods and parameters
## Project structure
@@ -180,7 +184,7 @@ Refer to the [Komodo Developer Docs](https://developers.komodoplatform.com/basic
- [Contribution guide](./docs/CONTRIBUTING.md)
- [Setting up the environment to run the full tests suite](./docs/DEV_ENVIRONMENT.md)
- [Git flow and general workflow](./docs/GIT_FLOW_AND_WORKING_PROCESS.md)
-- [Komodo Developer Docs](https://developers.komodoplatform.com/basic-docs/atomicdex/introduction-to-atomicdex.html)
+- [Komodo Developer Docs](https://komodoplatform.com/en/docs/komodo-defi-framework/)
## Disclaimer
@@ -193,5 +197,5 @@ The current state can be considered as an alpha version.
## Help and troubleshooting
-If you have any question/want to report a bug/suggest an improvement feel free to [open an issue](https://github.com/KomodoPlatform/komodo-defi-framework/issues/new/choose) or join the [Komodo Platform Discord](https://discord.gg/PGxVm2y) `dev-marketmaker` channel.
+If you have any question/want to report a bug/suggest an improvement feel free to [open an issue](https://github.com/KomodoPlatform/komodo-defi-framework/issues/new/choose) or join the [Komodo Platform Discord](https://discord.gg/PGxVm2y) `dev-general` channel.
diff --git a/docs/DEV_ENVIRONMENT.md b/docs/DEV_ENVIRONMENT.md
index 5e4f6d1659..8782769079 100644
--- a/docs/DEV_ENVIRONMENT.md
+++ b/docs/DEV_ENVIRONMENT.md
@@ -66,16 +66,34 @@
CC=/opt/homebrew/opt/llvm/bin/clang AR=/opt/homebrew/opt/llvm/bin/llvm-ar wasm-pack test --firefox --headless mm2src/mm2_main
```
Please note `CC` and `AR` must be specified in the same line as `wasm-pack test mm2src/mm2_main`.
-#### Running specific WASM tests with Cargo
- - Install `wasm-bindgen-cli`:
- Make sure you have wasm-bindgen-cli installed with a version that matches the one specified in your Cargo.toml file.
- You can install it using Cargo with the following command:
- ```
- cargo install -f wasm-bindgen-cli --version
- ```
- - Run
- ```
- cargo test --target wasm32-unknown-unknown --package coins --lib utxo::utxo_block_header_storage::wasm::indexeddb_block_header_storage
- ```
+
+#### Running specific WASM tests
+
+There are two primary methods for running specific tests:
+
+* **Method 1: Using `wasm-pack` (Recommended for browser-based tests)**
+
+ To filter tests, append `--` to the `wasm-pack test` command, followed by the name of the test you want to run. This will execute only the tests whose names contain the provided string.
+
+ General Example:
+ ```shell
+ wasm-pack test --firefox --headless mm2src/mm2_main --
+ ```
+
+ > **Note for macOS users:** You must prepend the `CC` and `AR` environment variables to the command if they weren't already exported, just as you would when running all tests. For example: `CC=... AR=... wasm-pack test ...`
+
+* **Method 2: Using `cargo test` (For non-browser tests)**
+
+ This method uses the standard Cargo test runner with a wasm target and is useful for tests that do not require a browser environment.
+
+ a. **Install `wasm-bindgen-cli`**: Make sure you have `wasm-bindgen-cli` installed with a version that matches the one specified in your `Cargo.toml` file.
+ ```shell
+ cargo install -f wasm-bindgen-cli --version
+ ```
+
+ b. **Run the test**: Append `--` to the `cargo test` command, followed by the test path.
+ ```shell
+ cargo test --target wasm32-unknown-unknown --package coins --lib -- utxo::utxo_block_header_storage::wasm::indexeddb_block_header_storage
+ ```
PS If you notice that this guide is outdated, please submit a PR.
diff --git a/mm2src/adex_cli/Cargo.lock b/mm2src/adex_cli/Cargo.lock
index 5d5eb5abeb..099a669565 100644
--- a/mm2src/adex_cli/Cargo.lock
+++ b/mm2src/adex_cli/Cargo.lock
@@ -336,12 +336,6 @@ dependencies = [
"rustc-demangle",
]
-[[package]]
-name = "base58"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6107fe1be6682a68940da878d9e9f5e90ca5745b3dec9fd1bb393c8777d4f581"
-
[[package]]
name = "base64"
version = "0.21.7"
@@ -1714,7 +1708,6 @@ dependencies = [
name = "keys"
version = "0.1.0"
dependencies = [
- "base58",
"bech32",
"bitcrypto",
"derive_more",
diff --git a/mm2src/adex_cli/Cargo.toml b/mm2src/adex_cli/Cargo.toml
index cb477cacb0..cc05303755 100644
--- a/mm2src/adex_cli/Cargo.toml
+++ b/mm2src/adex_cli/Cargo.toml
@@ -7,33 +7,34 @@ description = "Provides a CLI interface and facilitates interoperating to komodo
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
-anyhow = { version = "1.0", features = ["std"] }
-async-trait = "0.1"
-clap = { version = "4.2", features = ["derive"] }
+anyhow = { workspace = true, features = ["std"] }
+async-trait.workspace = true
+clap.workspace = true
common = { path = "../common" }
-derive_more = "0.99"
-directories = "5.0"
-env_logger = "0.9.3"
-http = "0.2"
-hyper = { version = "0.14.26", features = ["client", "http2", "tcp"] }
-hyper-rustls = "0.24"
-gstuff = { version = "0.7" , features = [ "nightly" ]}
-inquire = "0.6"
-itertools = "0.10"
-log = "0.4.21"
+derive_more.workspace = true
+directories.workspace = true
+env_logger.workspace = true
+http.workspace = true
+hyper = { workspace = true, features = ["client", "http2", "tcp"] }
+hyper-rustls.workspace = true
+stuff.workspace = true
+inquire.workspace = true
+itertools.workspace = true
+log.workspace = true
mm2_net = { path = "../mm2_net" }
mm2_number = { path = "../mm2_number" }
mm2_rpc = { path = "../mm2_rpc"}
mm2_core = { path = "../mm2_core" }
-passwords = "3.1"
+passwords.workspace = true
rpc = { path = "../mm2_bitcoin/rpc" }
-rustls = { version = "0.21", features = [ "dangerous_configuration" ] }
-serde = "1.0"
-serde_json = { version = "1", features = ["preserve_order", "raw_value"] }
-sysinfo = "0.28"
-tiny-bip39 = "0.8.0"
-tokio = { version = "1.20.0", features = [ "macros" ] }
-uuid = { version = "1.2.2", features = ["fast-rng", "serde", "v4"] }
+rustls = { workspace = true, features = [ "dangerous_configuration" ] }
+serde.workspace = true
+serde_json = { workspace = true, features = ["preserve_order", "raw_value"] }
+sysinfo.workspace = true
+tiny-bip39.workspace = true
+tokio = { workspace = true, features = [ "macros" ] }
+uuid.workspace = true
[target.'cfg(windows)'.dependencies]
-winapi = { version = "0.3.3", features = ["processthreadsapi", "winnt"] }
+winapi = { workspace = true, features = ["processthreadsapi", "winnt"] }
+
diff --git a/mm2src/coins/Cargo.toml b/mm2src/coins/Cargo.toml
index 13aa9c2b72..3e49769c7e 100644
--- a/mm2src/coins/Cargo.toml
+++ b/mm2src/coins/Cargo.toml
@@ -13,60 +13,62 @@ enable-sia = [
default = []
run-docker-tests = []
for-tests = ["dep:mocktopus"]
-new-db-arch = []
+new-db-arch = ["mm2_core/new-db-arch"]
+
+# Temporary feature for implementing IBC wrap/unwrap mechanism and will be removed
+# once we consider it as stable.
+ibc-routing-for-swaps = []
[lib]
path = "lp_coins.rs"
doctest = false
[dependencies]
-async-std = { version = "1.5", features = ["unstable"] }
-async-trait = "0.1.52"
-base64 = "0.21.2"
-base58 = "0.2.0"
-bip32 = { version = "0.2.2", default-features = false, features = ["alloc", "secp256k1-ffi"] }
-bitcoin_hashes = "0.11"
+async-std = { workspace = true, features = ["unstable"] }
+async-trait.workspace = true
+base64.workspace = true
+bip32.workspace = true
+bitcoin_hashes.workspace = true
bitcrypto = { path = "../mm2_bitcoin/crypto" }
-blake2b_simd = { version = "0.5.10", optional = true }
-byteorder = "1.3"
-bytes = "0.4"
-cfg-if = "1.0"
+blake2b_simd = { workspace = true, optional = true }
+bs58.workspace = true
+byteorder.workspace = true
+bytes.workspace = true
+cfg-if.workspace = true
chain = { path = "../mm2_bitcoin/chain" }
-chrono = { version = "0.4.23", "features" = ["serde"] }
+chrono = { workspace = true, "features" = ["serde"] }
common = { path = "../common" }
-compatible-time = { version = "1.1.0", package = "web-time" }
-cosmrs = { version = "0.16", default-features = false }
-crossbeam = "0.8"
+compatible-time.workspace = true
+cosmrs.workspace = true
+crossbeam.workspace = true
crypto = { path = "../crypto" }
db_common = { path = "../db_common" }
-derive_more = "0.99"
-ed25519-dalek = { version = "1.0.1", features = ["serde"] }
+derive_more.workspace = true
+ed25519-dalek.workspace = true
enum_derives = { path = "../derives/enum_derives" }
-ethabi = { version = "17.0.0" }
-ethcore-transaction = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
-ethereum-types = { version = "0.13", default-features = false, features = ["std", "serialize"] }
-ethkey = { git = "https://github.com/KomodoPlatform/mm2-parity-ethereum.git", rev = "mm2-v2.1.1" }
-# Waiting for https://github.com/rust-lang/rust/issues/54725 to use on Stable.
-#enum_dispatch = "0.1"
-futures01 = { version = "0.1", package = "futures" }
-futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] }
-futures-ticker = "0.0.3"
-# using select macro requires the crate to be named futures, compilation failed with futures03 name
-futures = { version = "0.3", package = "futures", features = ["compat", "async-await"] }
-group = "0.8.0"
-gstuff = { version = "0.7", features = ["nightly"] }
-hex = "0.4.2"
-http = "0.2"
-itertools = { version = "0.10", features = ["use_std"] }
-jsonrpc-core = "18.0.0"
+kdf_walletconnect = { path = "../kdf_walletconnect" }
+ethabi.workspace = true
+ethcore-transaction.workspace = true
+ethereum-types.workspace = true
+ethkey.workspace = true
+futures01.workspace = true
+futures-util.workspace = true
+futures-ticker.workspace = true
+futures = { workspace = true, features = ["compat", "async-await"] }
+group.workspace = true
+gstuff.workspace = true
+hex.workspace = true
+http.workspace = true
+itertools = { workspace = true, features = ["use_std"] }
+jsonrpc-core.workspace = true
+jubjub.workspace = true
keys = { path = "../mm2_bitcoin/keys" }
-lazy_static = "1.4"
-libc = "0.2"
-nom = "6.1.2"
+lazy_static.workspace = true
+libc.workspace = true
+nom.workspace = true
mm2_core = { path = "../mm2_core" }
mm2_err_handle = { path = "../mm2_err_handle" }
mm2_event_stream = { path = "../mm2_event_stream" }
-mm2_git = { path = "../mm2_git" }
mm2_io = { path = "../mm2_io" }
mm2_metrics = { path = "../mm2_metrics" }
mm2_net = { path = "../mm2_net" }
@@ -74,100 +76,101 @@ mm2_number = { path = "../mm2_number"}
mm2_p2p = { path = "../mm2_p2p", default-features = false }
mm2_rpc = { path = "../mm2_rpc" }
mm2_state_machine = { path = "../mm2_state_machine" }
-mocktopus = { version = "0.8.0", optional = true }
-num-traits = "0.2"
-parking_lot = { version = "0.12.0", features = ["nightly"] }
+mocktopus = { workspace = true, optional = true }
+num-traits.workspace = true
+parking_lot = { workspace = true, features = ["nightly"] }
primitives = { path = "../mm2_bitcoin/primitives" }
-prost = "0.12"
-protobuf = "2.20"
+prost.workspace = true
+protobuf.workspace = true
proxy_signature = { path = "../proxy_signature" }
-rand = { version = "0.7", features = ["std", "small_rng"] }
-regex = "1"
-reqwest = { version = "0.11.9", default-features = false, features = ["json"], optional = true }
-rlp = { version = "0.5" }
-rmp-serde = "0.14.3"
+rand = { workspace = true, features = ["std", "small_rng"] }
+regex.workspace = true
+reqwest = { workspace = true, optional = true }
+rlp.workspace = true
+rmp-serde.workspace = true
rpc = { path = "../mm2_bitcoin/rpc" }
rpc_task = { path = "../rpc_task" }
script = { path = "../mm2_bitcoin/script" }
-secp256k1 = { version = "0.20" }
+secp256k1.workspace = true
ser_error = { path = "../derives/ser_error" }
ser_error_derive = { path = "../derives/ser_error_derive" }
-serde = "1.0"
-serde_derive = "1.0"
-serde_json = { version = "1", features = ["preserve_order", "raw_value"] }
-serde_with = "1.14.0"
+serde.workspace = true
+serde_derive.workspace = true
+serde_json = { workspace = true, features = ["preserve_order", "raw_value"] }
+serde_with.workspace = true
serialization = { path = "../mm2_bitcoin/serialization" }
serialization_derive = { path = "../mm2_bitcoin/serialization_derive" }
sia-rust = { git = "https://github.com/KomodoPlatform/sia-rust", rev = "9f188b80b3213bcb604e7619275251ce08fae808", optional = true }
spv_validation = { path = "../mm2_bitcoin/spv_validation" }
-sha2 = "0.10"
-sha3 = "0.9"
+sha2.workspace = true
+sha3.workspace = true
utxo_signer = { path = "utxo_signer" }
# using the same version as cosmrs
-tendermint-rpc = { version = "0.35", default-features = false }
-tokio-tungstenite-wasm = { git = "https://github.com/KomodoPlatform/tokio-tungstenite-wasm", rev = "d20abdb", features = ["rustls-tls-native-roots"]}
-url = { version = "2.2.2", features = ["serde"] }
-uuid = { version = "1.2.2", features = ["fast-rng", "serde", "v4"] }
+tendermint-rpc.workspace = true
+tokio-tungstenite-wasm = { workspace = true, features = ["rustls-tls-native-roots"]}
+url.workspace = true
+uuid.workspace = true
# One of web3 dependencies is the old `tokio-uds 0.1.7` which fails cross-compiling to ARM.
# We don't need the default web3 features at all since we added our own web3 transport using shared HYPER instance.
-web3 = { git = "https://github.com/KomodoPlatform/rust-web3", tag = "v0.20.0", default-features = false }
-zbase32 = "0.1.2"
-zcash_client_backend = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2" }
-zcash_extras = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2" }
-zcash_primitives = {features = ["transparent-inputs"], git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2" }
+web3 = { workspace = true, default-features = false }
+zbase32.workspace = true
+zcash_client_backend.workspace = true
+zcash_extras.workspace = true
+zcash_primitives.workspace = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
-blake2b_simd = "0.5"
-ff = "0.8"
-futures-util = "0.3"
-jubjub = "0.5.1"
-js-sys = { version = "0.3.27" }
+blake2b_simd.workspace = true
+ff.workspace = true
+futures-util.workspace = true
+jubjub.workspace = true
+js-sys.workspace = true
mm2_db = { path = "../mm2_db" }
mm2_metamask = { path = "../mm2_metamask" }
mm2_test_helpers = { path = "../mm2_test_helpers" }
-time = { version = "0.3.20", features = ["wasm-bindgen"] }
-timed-map = { version = "1.3", features = ["rustc-hash", "wasm"] }
-tonic = { version = "0.10", default-features = false, features = ["prost", "codegen", "gzip"] }
-tower-service = "0.3"
-wasm-bindgen = "0.2.86"
-wasm-bindgen-futures = { version = "0.4.1" }
-wasm-bindgen-test = { version = "0.3.2" }
-web-sys = { version = "0.3.55", features = ["console", "Headers", "Request", "RequestInit", "RequestMode", "Response", "Window"] }
-zcash_proofs = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2", default-features = false, features = ["local-prover"] }
+time = { workspace = true, features = ["wasm-bindgen"] }
+timed-map = { workspace = true, features = ["rustc-hash", "wasm"] }
+tonic = { workspace = true, default-features = false, features = ["prost", "codegen", "gzip"] }
+tower-service.workspace = true
+wasm-bindgen.workspace = true
+wasm-bindgen-futures.workspace = true
+wasm-bindgen-test.workspace = true
+web-sys = { workspace = true, features = ["console", "Headers", "Request", "RequestInit", "RequestMode", "Response", "Window"] }
+zcash_proofs = { workspace = true, features = ["local-prover"] }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
-dirs = { version = "1" }
-bitcoin = "0.29"
-hyper = { version = "0.14.26", features = ["client", "http2", "server", "tcp"] }
-# using webpki-tokio to avoid rejecting valid certificates
-# got "invalid certificate: UnknownIssuer" for https://ropsten.infura.io on iOS using default-features
-hyper-rustls = { version = "0.24", default-features = false, features = ["http1", "http2", "webpki-tokio"] }
-lightning = "0.0.113"
-lightning-background-processor = "0.0.113"
-lightning-invoice = { version = "0.21.0", features = ["serde"] }
-lightning-net-tokio = "0.0.113"
-rust-ini = { version = "0.13" }
-rustls = { version = "0.21", features = ["dangerous_configuration"] }
-secp256k1v24 = { version = "0.24", package = "secp256k1" }
-timed-map = { version = "1.3", features = ["rustc-hash"] }
-tokio = { version = "1.20" }
-tokio-rustls = { version = "0.24" }
-tonic = { version = "0.10", features = ["tls", "tls-webpki-roots", "gzip"] }
-webpki-roots = { version = "0.25" }
-zcash_client_sqlite = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2" }
-zcash_proofs = { git = "https://github.com/KomodoPlatform/librustzcash.git", tag = "k-1.4.2", default-features = false, features = ["local-prover", "multicore"] }
+dirs.workspace = true
+bitcoin.workspace = true
+hyper = { workspace = true, features = ["client", "http2", "server", "tcp"] }
+hyper-rustls = { workspace = true, default-features = false, features = ["http1", "http2", "webpki-tokio"] }
+lightning.workspace = true
+lightning-background-processor.workspace = true
+lightning-invoice.workspace = true
+lightning-net-tokio.workspace = true
+rust-ini.workspace = true
+rustls = { workspace = true, features = ["dangerous_configuration"] }
+secp256k1v24.workspace = true
+timed-map = { workspace = true, features = ["rustc-hash"] }
+tokio.workspace = true
+tokio-rustls.workspace = true
+tonic = { workspace = true, features = ["codegen", "prost", "gzip", "tls", "tls-webpki-roots"] }
+webpki-roots.workspace = true
+zcash_client_sqlite.workspace = true
+zcash_proofs = { workspace = true, features = ["local-prover", "multicore"] }
[target.'cfg(windows)'.dependencies]
-winapi = "0.3"
+winapi.workspace = true
[dev-dependencies]
mm2_test_helpers = { path = "../mm2_test_helpers" }
-mocktopus = { version = "0.8.0" }
+mocktopus.workspace = true
mm2_p2p = { path = "../mm2_p2p", features = ["application"] }
+ff.workspace = true
+jubjub.workspace = true
+reqwest.workspace = true
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
-wagyu-zcash-parameters = { version = "0.2" }
+wagyu-zcash-parameters.workspace = true
[build-dependencies]
-prost-build = { version = "0.12", default-features = false }
-tonic-build = { version = "0.10", default-features = false, features = ["prost"] }
+prost-build.workspace = true
+tonic-build.workspace = true
diff --git a/mm2src/coins/coin_balance.rs b/mm2src/coins/coin_balance.rs
index 3ec047ee80..dbcf02c343 100644
--- a/mm2src/coins/coin_balance.rs
+++ b/mm2src/coins/coin_balance.rs
@@ -506,6 +506,27 @@ pub mod common_impl {
params.min_addresses_number.max(Some(path_to_address.address_id + 1)),
)
.await?;
+ drop(new_account);
+
+ if coin.is_trezor() {
+ let enabled_address =
+ hd_wallet
+ .get_enabled_address()
+ .await
+ .ok_or(EnableCoinBalanceError::NewAddressDerivingError(
+ NewAddressDerivingError::Internal(
+ "Couldn't find enabled address after it has already been enabled".to_string(),
+ ),
+ ))?;
+ coin.received_enabled_address_from_hw_wallet(enabled_address)
+ .await
+ .map_err(|e| {
+ EnableCoinBalanceError::NewAddressDerivingError(NewAddressDerivingError::Internal(format!(
+ "Coin rejected the enabled address derived from the hardware wallet: {}",
+ e
+ )))
+ })?;
+ }
// Todo: The enabled address should be indicated in the response.
result.accounts.push(account_balance);
return Ok(result);
@@ -538,6 +559,27 @@ pub mod common_impl {
.await?;
result.accounts.push(account_balance);
}
+ drop(accounts);
+
+ if coin.is_trezor() {
+ let enabled_address =
+ hd_wallet
+ .get_enabled_address()
+ .await
+ .ok_or(EnableCoinBalanceError::NewAddressDerivingError(
+ NewAddressDerivingError::Internal(
+ "Couldn't find enabled address after it has already been enabled".to_string(),
+ ),
+ ))?;
+ coin.received_enabled_address_from_hw_wallet(enabled_address)
+ .await
+ .map_err(|e| {
+ EnableCoinBalanceError::NewAddressDerivingError(NewAddressDerivingError::Internal(format!(
+ "Coin rejected the enabled address derived from the hardware wallet: {}",
+ e
+ )))
+ })?;
+ }
Ok(result)
}
diff --git a/mm2src/coins/coin_errors.rs b/mm2src/coins/coin_errors.rs
index 3e9bbc7349..86a2c0da00 100644
--- a/mm2src/coins/coin_errors.rs
+++ b/mm2src/coins/coin_errors.rs
@@ -108,3 +108,15 @@ pub enum MyAddressError {
UnexpectedDerivationMethod(String),
InternalError(String),
}
+
+impl std::error::Error for MyAddressError {
+ fn source(&self) -> Option<&(dyn std::error::Error + 'static)> {
+ // This error doesn't wrap another error, so we return None
+ None
+ }
+}
+
+#[derive(Debug, Display)]
+pub enum AddressFromPubkeyError {
+ InternalError(String),
+}
diff --git a/mm2src/coins/coins_tests.rs b/mm2src/coins/coins_tests.rs
deleted file mode 100644
index bc7ab27897..0000000000
--- a/mm2src/coins/coins_tests.rs
+++ /dev/null
@@ -1,164 +0,0 @@
-use crate::update_coins_config;
-
-#[test]
-fn test_update_coin_config_success() {
- let conf = json!([
- {
- "coin": "RICK",
- "asset": "RICK",
- "fname": "RICK (TESTCOIN)",
- "rpcport": 25435,
- "txversion": 4,
- "overwintered": 1,
- "mm2": 1,
- },
- {
- "coin": "MORTY",
- "asset": "MORTY",
- "fname": "MORTY (TESTCOIN)",
- "rpcport": 16348,
- "txversion": 4,
- "overwintered": 1,
- "mm2": 1,
- },
- {
- "coin": "ETH",
- "name": "ethereum",
- "fname": "Ethereum",
- "etomic": "0x0000000000000000000000000000000000000000",
- "rpcport": 80,
- "mm2": 1,
- "required_confirmations": 3,
- },
- {
- "coin": "ARPA",
- "name": "arpa-chain",
- "fname": "ARPA Chain",
- // ARPA coin contains the protocol already. This coin should be skipped.
- "protocol": {
- "type":"ERC20",
- "protocol_data": {
- "platform": "ETH",
- "contract_address": "0xBA50933C268F567BDC86E1aC131BE072C6B0b71a"
- }
- },
- "rpcport": 80,
- "mm2": 1,
- "required_confirmations": 3,
- },
- {
- "coin": "JST",
- "name": "JST",
- "fname": "JST (TESTCOIN)",
- "etomic": "0x996a8ae0304680f6a69b8a9d7c6e37d65ab5ab56",
- "rpcport": 80,
- "mm2": 1,
- },
- ]);
- let actual = update_coins_config(conf).unwrap();
- let expected = json!([
- {
- "coin": "RICK",
- "asset": "RICK",
- "fname": "RICK (TESTCOIN)",
- "rpcport": 25435,
- "txversion": 4,
- "overwintered": 1,
- "mm2": 1,
- "protocol": {
- "type": "UTXO"
- },
- },
- {
- "coin": "MORTY",
- "asset": "MORTY",
- "fname": "MORTY (TESTCOIN)",
- "rpcport": 16348,
- "txversion": 4,
- "overwintered": 1,
- "mm2": 1,
- "protocol": {
- "type": "UTXO"
- },
- },
- {
- "coin": "ETH",
- "name": "ethereum",
- "fname": "Ethereum",
- "rpcport": 80,
- "mm2": 1,
- "required_confirmations": 3,
- "protocol": {
- "type": "ETH"
- },
- },
- {
- "coin": "ARPA",
- "name": "arpa-chain",
- "fname": "ARPA Chain",
- "protocol": {
- "type": "ERC20",
- "protocol_data": {
- "platform": "ETH",
- "contract_address": "0xBA50933C268F567BDC86E1aC131BE072C6B0b71a"
- }
- },
- "rpcport": 80,
- "mm2": 1,
- "required_confirmations": 3,
- },
- {
- "coin": "JST",
- "name": "JST",
- "fname": "JST (TESTCOIN)",
- "rpcport": 80,
- "mm2": 1,
- "protocol": {
- "type": "ERC20",
- "protocol_data": {
- "platform": "ETH",
- "contract_address": "0x996a8ae0304680f6a69b8a9d7c6e37d65ab5ab56"
- }
- },
- },
- ]);
- assert_eq!(actual, expected);
-}
-
-#[test]
-fn test_update_coin_config_error_not_array() {
- let conf = json!({
- "coin": "RICK",
- "asset": "RICK",
- "fname": "RICK (TESTCOIN)",
- "rpcport": 25435,
- "txversion": 4,
- "overwintered": 1,
- "mm2": 1,
- });
- let error = update_coins_config(conf).err().unwrap();
- assert!(error.contains("Coins config must be an array"));
-}
-
-#[test]
-fn test_update_coin_config_error_not_object() {
- let conf = json!([["Ford", "BMW", "Fiat"]]);
- let error = update_coins_config(conf).err().unwrap();
- assert!(error.contains("Expected object, found"));
-}
-
-#[test]
-fn test_update_coin_config_invalid_etomic() {
- let conf = json!([
- {
- "coin": "JST",
- "name": "JST",
- "fname": "JST (TESTCOIN)",
- "etomic": 12345678,
- "rpcport": 80,
- "mm2": 1,
- },
- ]);
- let error = update_coins_config(conf).err().unwrap();
- assert!(error.contains("Expected etomic as string, found"));
-}
diff --git a/mm2src/coins/eth.rs b/mm2src/coins/eth.rs
index 7a82841687..91c3294c2d 100644
--- a/mm2src/coins/eth.rs
+++ b/mm2src/coins/eth.rs
@@ -20,6 +20,7 @@
//
// Copyright © 2023 Pampex LTD and TillyHK LTD. All rights reserved.
//
+use self::wallet_connect::{send_transaction_with_walletconnect, WcEthTxParams};
use super::eth::Action::{Call, Create};
use super::watcher_common::{validate_watcher_reward, REWARD_GAS_AMOUNT};
use super::*;
@@ -58,6 +59,7 @@ use common::executor::{abortable_queue::AbortableQueue, AbortSettings, Abortable
Timer};
use common::log::{debug, error, info, warn};
use common::number_type_casting::SafeTypeCastingNumbers;
+use common::wait_until_sec;
use common::{now_sec, small_rng, DEX_FEE_ADDR_RAW_PUBKEY};
use crypto::privkey::key_pair_from_secret;
use crypto::{Bip44Chain, CryptoCtx, CryptoCtxError, GlobalHDAccountArc, KeyPairPolicy};
@@ -77,6 +79,7 @@ use futures::compat::Future01CompatExt;
use futures::future::{join, join_all, select_ok, try_join_all, Either, FutureExt, TryFutureExt};
use futures01::Future;
use http::Uri;
+use kdf_walletconnect::{WalletConnectCtx, WalletConnectOps};
use mm2_core::mm_ctx::{MmArc, MmWeak};
use mm2_number::bigdecimal_custom::CheckedDivision;
use mm2_number::{BigDecimal, BigUint, MmNumber};
@@ -100,9 +103,8 @@ use web3::types::{Action as TraceAction, BlockId, BlockNumber, Bytes, CallReques
use web3::{self, Web3};
cfg_wasm32! {
- use common::{now_ms, wait_until_ms};
use crypto::MetamaskArc;
- use ethereum_types::{H264, H520};
+ use ethereum_types::H520;
use mm2_metamask::MetamaskError;
use web3::types::TransactionRequest;
}
@@ -137,6 +139,7 @@ mod eth_rpc;
#[cfg(target_arch = "wasm32")] mod eth_wasm_tests;
#[cfg(any(test, target_arch = "wasm32"))] mod for_tests;
pub(crate) mod nft_swap_v2;
+pub mod wallet_connect;
mod web3_transport;
use web3_transport::{http_transport::HttpTransportNode, Web3Transport};
@@ -161,6 +164,8 @@ use erc20::get_token_decimals;
pub(crate) mod eth_swap_v2;
use eth_swap_v2::{extract_id_from_tx_data, EthPaymentType, PaymentMethod, SpendTxSearchParams};
+pub mod tron;
+
/// https://github.com/artemii235/etomic-swap/blob/master/contracts/EtomicSwap.sol
/// Dev chain (195.201.137.5:8565) contract address: 0x83965C539899cC0F918552e5A26915de40ee8852
/// Ropsten: https://ropsten.etherscan.io/address/0x7bc1bbdd6a0a722fc9bffc49c921b685ecb84b94
@@ -762,6 +767,30 @@ struct SavedErc20Events {
latest_block: U64,
}
+/// Specifies which blockchain the EthCoin operates on: EVM-compatible or TRON.
+/// This distinction allows unified logic for EVM & TRON coins.
+#[derive(Clone, Debug)]
+pub enum ChainSpec {
+ Evm { chain_id: u64 },
+ Tron { network: tron::Network },
+}
+
+impl ChainSpec {
+ pub fn chain_id(&self) -> Option {
+ match self {
+ ChainSpec::Evm { chain_id } => Some(*chain_id),
+ ChainSpec::Tron { .. } => None,
+ }
+ }
+
+ pub fn kind(&self) -> &'static str {
+ match self {
+ ChainSpec::Evm { .. } => "EVM",
+ ChainSpec::Tron { .. } => "TRON",
+ }
+ }
+}
+
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum EthCoinType {
/// Ethereum itself or it's forks: ETC/others
@@ -784,6 +813,11 @@ pub enum EthPrivKeyBuildPolicy {
#[cfg(target_arch = "wasm32")]
Metamask(MetamaskArc),
Trezor,
+ WalletConnect {
+ address: Address,
+ public_key_uncompressed: H520,
+ session_topic: String,
+ },
}
impl EthPrivKeyBuildPolicy {
@@ -816,6 +850,8 @@ impl From for EthPrivKeyBuildPolicy {
pub struct EthCoinImpl {
ticker: String,
pub coin_type: EthCoinType,
+ /// Specifies the underlying blockchain (EVM or TRON).
+ pub chain_spec: ChainSpec,
pub(crate) priv_key_policy: EthPrivKeyPolicy,
/// Either an Iguana address or a 'EthHDWallet' instance.
/// Arc is used to use the same hd wallet from platform coin if we need to.
@@ -836,7 +872,6 @@ pub struct EthCoinImpl {
/// Coin needs access to the context in order to reuse the logging and shutdown facilities.
/// Using a weak reference by default in order to avoid circular references and leaks.
pub ctx: MmWeak,
- chain_id: u64,
/// The name of the coin with which Trezor wallet associates this asset.
trezor_coin: Option,
/// the block range used for eth_getLogs
@@ -913,7 +948,7 @@ macro_rules! tx_type_from_pay_for_gas_option {
impl EthCoinImpl {
#[cfg(not(target_arch = "wasm32"))]
fn eth_traces_path(&self, ctx: &MmArc, my_address: Address) -> PathBuf {
- ctx.dbdir()
+ ctx.address_dir(&my_address.display_address())
.join("TRANSACTIONS")
.join(format!("{}_{:#02x}_trace.json", self.ticker, my_address))
}
@@ -921,7 +956,8 @@ impl EthCoinImpl {
/// Load saved ETH traces from local DB
#[cfg(not(target_arch = "wasm32"))]
fn load_saved_traces(&self, ctx: &MmArc, my_address: Address) -> Option {
- let content = gstuff::slurp(&self.eth_traces_path(ctx, my_address));
+ let path = self.eth_traces_path(ctx, my_address);
+ let content = gstuff::slurp(&path);
if content.is_empty() {
None
} else {
@@ -943,9 +979,8 @@ impl EthCoinImpl {
#[cfg(not(target_arch = "wasm32"))]
fn store_eth_traces(&self, ctx: &MmArc, my_address: Address, traces: &SavedTraces) {
let content = json::to_vec(traces).unwrap();
- let tmp_file = format!("{}.tmp", self.eth_traces_path(ctx, my_address).display());
- std::fs::write(&tmp_file, content).unwrap();
- std::fs::rename(tmp_file, self.eth_traces_path(ctx, my_address)).unwrap();
+ let path = self.eth_traces_path(ctx, my_address);
+ mm2_io::fs::write(&path, &content, true).unwrap();
}
/// Store ETH traces to local DB
@@ -957,7 +992,7 @@ impl EthCoinImpl {
#[cfg(not(target_arch = "wasm32"))]
fn erc20_events_path(&self, ctx: &MmArc, my_address: Address) -> PathBuf {
- ctx.dbdir()
+ ctx.address_dir(&my_address.display_address())
.join("TRANSACTIONS")
.join(format!("{}_{:#02x}_events.json", self.ticker, my_address))
}
@@ -966,9 +1001,8 @@ impl EthCoinImpl {
#[cfg(not(target_arch = "wasm32"))]
fn store_erc20_events(&self, ctx: &MmArc, my_address: Address, events: &SavedErc20Events) {
let content = json::to_vec(events).unwrap();
- let tmp_file = format!("{}.tmp", self.erc20_events_path(ctx, my_address).display());
- std::fs::write(&tmp_file, content).unwrap();
- std::fs::rename(tmp_file, self.erc20_events_path(ctx, my_address)).unwrap();
+ let path = self.erc20_events_path(ctx, my_address);
+ mm2_io::fs::write(&path, &content, true).unwrap();
}
/// Store ERC20 events to local DB
@@ -981,7 +1015,8 @@ impl EthCoinImpl {
/// Load saved ERC20 events from local DB
#[cfg(not(target_arch = "wasm32"))]
fn load_saved_erc20_events(&self, ctx: &MmArc, my_address: Address) -> Option {
- let content = gstuff::slurp(&self.erc20_events_path(ctx, my_address));
+ let path = self.erc20_events_path(ctx, my_address);
+ let content = gstuff::slurp(&path);
if content.is_empty() {
None
} else {
@@ -1043,7 +1078,7 @@ impl EthCoinImpl {
}
#[inline(always)]
- pub fn chain_id(&self) -> u64 { self.chain_id }
+ pub fn chain_id(&self) -> Option { self.chain_spec.chain_id() }
}
async fn get_raw_transaction_impl(coin: EthCoin, req: RawTransactionRequest) -> RawTransactionResult {
@@ -1161,7 +1196,16 @@ pub async fn withdraw_erc1155(ctx: MmArc, withdraw_type: WithdrawErc1155) -> Wit
.build()
.map_to_mm(|e| WithdrawError::InternalError(e.to_string()))?;
let secret = eth_coin.priv_key_policy.activated_key_or_err()?.secret();
- let signed = tx.sign(secret, Some(eth_coin.chain_id))?;
+ let chain_id = match eth_coin.chain_spec {
+ ChainSpec::Evm { chain_id } => chain_id,
+ // Todo: Add support for Tron NFTs
+ ChainSpec::Tron { .. } => {
+ return MmError::err(WithdrawError::InternalError(
+ "Tron is not supported for withdraw_erc1155 yet".to_owned(),
+ ))
+ },
+ };
+ let signed = tx.sign(secret, Some(chain_id))?;
let signed_bytes = rlp::encode(&signed);
let fee_details = EthTxFeeDetails::new(gas, pay_for_gas_option, fee_coin)?;
@@ -1252,7 +1296,16 @@ pub async fn withdraw_erc721(ctx: MmArc, withdraw_type: WithdrawErc721) -> Withd
.build()
.map_to_mm(|e| WithdrawError::InternalError(e.to_string()))?;
let secret = eth_coin.priv_key_policy.activated_key_or_err()?.secret();
- let signed = tx.sign(secret, Some(eth_coin.chain_id))?;
+ let chain_id = match eth_coin.chain_spec {
+ ChainSpec::Evm { chain_id } => chain_id,
+ // Todo: Add support for Tron NFTs
+ ChainSpec::Tron { .. } => {
+ return MmError::err(WithdrawError::InternalError(
+ "Tron is not supported for withdraw_erc721 yet".to_owned(),
+ ))
+ },
+ };
+ let signed = tx.sign(secret, Some(chain_id))?;
let signed_bytes = rlp::encode(&signed);
let fee_details = EthTxFeeDetails::new(gas, pay_for_gas_option, fee_coin)?;
@@ -1527,7 +1580,7 @@ impl SwapOps for EthCoin {
activated_key: ref key_pair,
..
} => key_pair_from_secret(key_pair.secret().as_fixed_bytes()).expect("valid key"),
- EthPrivKeyPolicy::Trezor => todo!(),
+ EthPrivKeyPolicy::Trezor | EthPrivKeyPolicy::WalletConnect { .. } => todo!(),
#[cfg(target_arch = "wasm32")]
EthPrivKeyPolicy::Metamask(_) => todo!(),
}
@@ -1545,6 +1598,7 @@ impl SwapOps for EthCoin {
.public_slice()
.try_into()
.expect("valid key length!"),
+ EthPrivKeyPolicy::WalletConnect { public_key, .. } => public_key.into(),
EthPrivKeyPolicy::Trezor => todo!(),
#[cfg(target_arch = "wasm32")]
EthPrivKeyPolicy::Metamask(ref metamask_policy) => metamask_policy.public_key.0,
@@ -2284,6 +2338,11 @@ impl MarketCoinOps for EthCoin {
}
}
+ fn address_from_pubkey(&self, pubkey: &H264Json) -> MmResult {
+ let addr = addr_from_raw_pubkey(&pubkey.0).map_err(AddressFromPubkeyError::InternalError)?;
+ Ok(addr.display_address())
+ }
+
async fn get_public_key(&self) -> Result> {
match self.priv_key_policy {
EthPrivKeyPolicy::Iguana(ref key_pair)
@@ -2311,6 +2370,10 @@ impl MarketCoinOps for EthCoin {
EthPrivKeyPolicy::Metamask(ref metamask_policy) => {
Ok(format!("{:02x}", metamask_policy.public_key_uncompressed))
},
+ EthPrivKeyPolicy::WalletConnect {
+ public_key_uncompressed,
+ ..
+ } => Ok(format!("{public_key_uncompressed:02x}")),
}
}
@@ -2328,10 +2391,25 @@ impl MarketCoinOps for EthCoin {
Some(keccak256(&stream.out()).take())
}
- fn sign_message(&self, message: &str) -> SignatureResult {
+ fn sign_message(&self, message: &str, address: Option) -> SignatureResult {
let message_hash = self.sign_message_hash(message).ok_or(SignatureError::PrefixNotFound)?;
- let privkey = &self.priv_key_policy.activated_key_or_err()?.secret();
- let signature = sign(privkey, &H256::from(message_hash))?;
+
+ let secret = if let Some(address) = address {
+ let path_to_coin = self.priv_key_policy.path_to_coin_or_err()?;
+ let derivation_path = address
+ .valid_derivation_path(path_to_coin)
+ .mm_err(|err| SignatureError::InvalidRequest(err.to_string()))?;
+ let privkey = self
+ .priv_key_policy
+ .hd_wallet_derived_priv_key_or_err(&derivation_path)?;
+ ethkey::Secret::from_slice(privkey.as_slice()).ok_or(MmError::new(SignatureError::InternalError(
+ "failed to derive ethkey::Secret".to_string(),
+ )))?
+ } else {
+ self.priv_key_policy.activated_key_or_err()?.secret().clone()
+ };
+ let signature = sign(&secret, &H256::from(message_hash))?;
+
Ok(format!("0x{}", signature))
}
@@ -2578,6 +2656,7 @@ impl MarketCoinOps for EthCoin {
EthPrivKeyPolicy::Trezor => ERR!("'display_priv_key' is not supported for Hardware Wallets"),
#[cfg(target_arch = "wasm32")]
EthPrivKeyPolicy::Metamask(_) => ERR!("'display_priv_key' is not supported for MetaMask"),
+ EthPrivKeyPolicy::WalletConnect { .. } => ERR!("'display_priv_key' is not supported for WalletConnect"),
}
}
@@ -2635,15 +2714,23 @@ async fn sign_transaction_with_keypair<'a>(
if !coin.is_tx_type_supported(&tx_type) {
return Err(TransactionErr::Plain("Eth transaction type not supported".into()));
}
+
let tx_builder = UnSignedEthTxBuilder::new(tx_type, nonce, gas, action, value, data);
let tx_builder = tx_builder_with_pay_for_gas_option(coin, tx_builder, pay_for_gas_option)
.map_err(|e| TransactionErr::Plain(e.get_inner().to_string()))?;
let tx = tx_builder.build()?;
+ let chain_id = match coin.chain_spec {
+ ChainSpec::Evm { chain_id } => chain_id,
+ // Todo: Add Tron signing logic
+ ChainSpec::Tron { .. } => {
+ return Err(TransactionErr::Plain(
+ "Tron is not supported for sign_transaction_with_keypair yet".into(),
+ ))
+ },
+ };
+ let signed_tx = tx.sign(key_pair.secret(), Some(chain_id))?;
- Ok((
- tx.sign(key_pair.secret(), Some(coin.chain_id))?,
- web3_instances_with_latest_nonce,
- ))
+ Ok((signed_tx, web3_instances_with_latest_nonce))
}
/// Sign and send eth transaction with provided keypair,
@@ -2717,7 +2804,7 @@ async fn sign_and_send_transaction_with_metamask(
// It's important to return the transaction hex for the swap,
// so wait up to 60 seconds for the transaction to appear on the RPC node.
- let wait_rpc_timeout = 60_000;
+ let wait_rpc_timeout = 60;
let check_every = 1.;
// Please note that this method may take a long time
@@ -2784,13 +2871,70 @@ async fn sign_raw_eth_tx(coin: &EthCoin, args: &SignEthTransactionParams) -> Raw
})
.map_to_mm(|err| RawTransactionError::TransactionError(err.get_plain_text_format()))
},
+ EthPrivKeyPolicy::WalletConnect { .. } => {
+ // NOTE: doesn't work with wallets that doesn't support `eth_signTransaction`.
+ // e.g Metamask
+ let wc = {
+ let ctx = MmArc::from_weak(&coin.ctx).expect("No context");
+ WalletConnectCtx::from_ctx(&ctx)
+ .expect("TODO: handle error when enable kdf initialization without key.")
+ };
+ // Todo: Tron will have to be set with `ChainSpec::Evm` to work with walletconnect.
+ // This means setting the protocol as `ETH` in coin config and having a different coin for this mode.
+ let chain_id = coin.chain_spec.chain_id().ok_or(RawTransactionError::InvalidParam(
+ "WalletConnect needs chain_id to be set".to_owned(),
+ ))?;
+ let my_address = coin
+ .derivation_method
+ .single_addr_or_err()
+ .await
+ .mm_err(|e| RawTransactionError::InternalError(e.to_string()))?;
+ let address_lock = coin.get_address_lock(my_address.to_string()).await;
+ let _nonce_lock = address_lock.lock().await;
+ let pay_for_gas_option = if let Some(ref pay_for_gas) = args.pay_for_gas {
+ pay_for_gas.clone().try_into()?
+ } else {
+ // use legacy gas_price() if not set
+ info!(target: "sign-and-send", "get_gas_price…");
+ let gas_price = coin.get_gas_price().await?;
+ PayForGasOption::Legacy(LegacyGasPrice { gas_price })
+ };
+ let (nonce, _) = coin
+ .clone()
+ .get_addr_nonce(my_address)
+ .compat()
+ .await
+ .map_to_mm(RawTransactionError::InvalidParam)?;
+ let (max_fee_per_gas, max_priority_fee_per_gas) = pay_for_gas_option.get_fee_per_gas();
+
+ info!(target: "sign-and-send", "WalletConnect signing and sending tx…");
+ let (signed_tx, _) = coin
+ .wc_sign_tx(&wc, WcEthTxParams {
+ my_address,
+ gas_price: pay_for_gas_option.get_gas_price(),
+ action,
+ value,
+ gas: args.gas_limit,
+ data: &data,
+ nonce,
+ chain_id,
+ max_fee_per_gas,
+ max_priority_fee_per_gas,
+ })
+ .await
+ .mm_err(|err| RawTransactionError::TransactionError(err.to_string()))?;
+
+ Ok(RawTransactionRes {
+ tx_hex: signed_tx.tx_hex().into(),
+ })
+ },
+ EthPrivKeyPolicy::Trezor => MmError::err(RawTransactionError::InvalidParam(
+ "sign raw eth tx not implemented for Trezor".into(),
+ )),
#[cfg(target_arch = "wasm32")]
EthPrivKeyPolicy::Metamask(_) => MmError::err(RawTransactionError::InvalidParam(
"sign raw eth tx not implemented for Metamask".into(),
)),
- EthPrivKeyPolicy::Trezor => MmError::err(RawTransactionError::InvalidParam(
- "sign raw eth tx not implemented for Trezor".into(),
- )),
}
}
@@ -3733,8 +3877,23 @@ impl EthCoin {
.single_addr_or_err()
.await
.map_err(|e| TransactionErr::Plain(ERRL!("{}", e)))?;
+
sign_and_send_transaction_with_keypair(&coin, key_pair, address, value, action, data, gas).await
},
+ EthPrivKeyPolicy::WalletConnect { .. } => {
+ let wc = {
+ let ctx = MmArc::from_weak(&coin.ctx).expect("No context");
+ WalletConnectCtx::from_ctx(&ctx)
+ .expect("TODO: handle error when enable kdf initialization without key.")
+ };
+ let address = coin
+ .derivation_method
+ .single_addr_or_err()
+ .await
+ .map_err(|e| TransactionErr::Plain(ERRL!("{}", e)))?;
+
+ send_transaction_with_walletconnect(coin, &wc, address, value, action, &data, gas).await
+ },
EthPrivKeyPolicy::Trezor => Err(TransactionErr::Plain(ERRL!("Trezor is not supported for swaps yet!"))),
#[cfg(target_arch = "wasm32")]
EthPrivKeyPolicy::Metamask(_) => {
@@ -5368,15 +5527,14 @@ impl EthCoin {
}
/// Returns `None` if the transaction hasn't appeared on the RPC nodes at the specified time.
- #[cfg(target_arch = "wasm32")]
async fn wait_for_tx_appears_on_rpc(
&self,
tx_hash: H256,
- wait_rpc_timeout_ms: u64,
+ wait_rpc_timeout_s: u64,
check_every: f64,
) -> Web3RpcResult