diff --git a/Cargo.lock b/Cargo.lock index 79d26799d..f1f0a8f68 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1507,14 +1507,13 @@ dependencies = [ name = "crypto-utils-evm" version = "0.1.0" dependencies = [ - "anyhow", "bip32", "hex-literal", "libsecp256k1", "sha3 0.10.8", "sp-core", "thiserror 2.0.17", - "tiny-bip39", + "tiny-bip39 2.0.0", ] [[package]] @@ -3738,7 +3737,7 @@ dependencies = [ "sp-runtime", "sp-timestamp", "thiserror 2.0.17", - "tiny-bip39", + "tiny-bip39 2.0.0", "tokio", "tracing", "try-runtime-cli", @@ -8134,7 +8133,7 @@ dependencies = [ "sp-runtime", "sp-version", "thiserror 1.0.69", - "tiny-bip39", + "tiny-bip39 1.0.1", "tokio", ] @@ -9759,7 +9758,7 @@ dependencies = [ "ss58-registry", "substrate-bip39", "thiserror 1.0.69", - "tiny-bip39", + "tiny-bip39 1.0.1", "zeroize", ] @@ -10784,6 +10783,23 @@ dependencies = [ "zeroize", ] +[[package]] +name = "tiny-bip39" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a30fd743a02bf35236f6faf99adb03089bb77e91c998dac2c2ad76bb424f668c" +dependencies = [ + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "rustc-hash", + "sha2 0.10.8", + "thiserror 1.0.69", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + [[package]] name = "tiny-keccak" version = "2.0.2" diff --git a/Cargo.toml b/Cargo.toml index f06db835a..8c743c1eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -58,7 +58,7 @@ similar-asserts = { version = "1", default-features = false } static_assertions = { version = "1", default-features = false } syn = { version = "2", default-features = false } thiserror = { version = "2.0.17", default-features = false } -tiny-bip39 = { version = "1", default-features = false } +tiny-bip39 = { version = "2", default-features = false } tokio = { version = "1", default-features = false } tracing = { version = "0.1", default-features = false } tracing-test = { version = "0.2", default-features = false } diff --git a/crates/crypto-utils-evm/Cargo.toml b/crates/crypto-utils-evm/Cargo.toml index 2e629e01a..80957c7cb 100644 --- a/crates/crypto-utils-evm/Cargo.toml +++ b/crates/crypto-utils-evm/Cargo.toml @@ -8,7 +8,6 @@ publish = false ignored = ["tiny-bip39"] [dependencies] -anyhow = { workspace = true } bip32 = { workspace = true, features = ["default"] } libsecp256k1 = { workspace = true } sha3 = { workspace = true, features = ["default"] } diff --git a/crates/crypto-utils-evm/src/lib.rs b/crates/crypto-utils-evm/src/lib.rs index b30137bf0..600f7599d 100644 --- a/crates/crypto-utils-evm/src/lib.rs +++ b/crates/crypto-utils-evm/src/lib.rs @@ -42,7 +42,7 @@ pub enum FromMnemonicBip44Error { pub enum FromPhraseBip44 { /// Mnemonic parsing failed. #[error("mnemonic: {0}")] - Mnemonic(anyhow::Error), + Mnemonic(bip39::ErrorKind), /// Inner [`KeyData::from_mnemonic_bip44`] call failed. #[error(transparent)] FromMnemonicBip44(FromMnemonicBip44Error), diff --git a/crates/humanode-peer/Cargo.toml b/crates/humanode-peer/Cargo.toml index 1538df368..5f5600cc8 100644 --- a/crates/humanode-peer/Cargo.toml +++ b/crates/humanode-peer/Cargo.toml @@ -74,7 +74,7 @@ sp-panic-handler = { workspace = true } sp-runtime = { workspace = true } sp-timestamp = { workspace = true } thiserror = { workspace = true } -tiny-bip39 = { workspace = true } +tiny-bip39 = { workspace = true, features = ["rand"] } tokio = { workspace = true, features = ["full"] } tracing = { workspace = true } try-runtime-cli = { workspace = true, optional = true } diff --git a/utils/checks/snapshots/features.yaml b/utils/checks/snapshots/features.yaml index d010e860e..52ecf2f53 100644 --- a/utils/checks/snapshots/features.yaml +++ b/utils/checks/snapshots/features.yaml @@ -3357,6 +3357,9 @@ - korean - rand - spanish +- name: tiny-bip39 2.0.0 + features: + - rand - name: tiny-keccak 2.0.2 features: - default