diff --git a/Cargo.toml b/Cargo.toml index 688d6e98..3b978a3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -201,6 +201,9 @@ lazy_static = { git = "https://github.com/rust-lang-nursery/lazy-static.rs", rev option-ext = { path = "patches/option-ext" } directories-next = { path = "patches/directories-next" } +# Patch from a fork back to upstream +parity-bip39 = { path = "patches/parity-bip39" } + # Patch to include `FromUniformBytes<64>` over `Scalar` k256 = { git = "https://github.com/kayabaNerve/elliptic-curves", rev = "4994c9ab163781a88cd4a49beae812a89a44e8c3" } p256 = { git = "https://github.com/kayabaNerve/elliptic-curves", rev = "4994c9ab163781a88cd4a49beae812a89a44e8c3" } diff --git a/deny.toml b/deny.toml index 4bc0837f..e28d5ffb 100644 --- a/deny.toml +++ b/deny.toml @@ -152,6 +152,7 @@ allow-git = [ "https://github.com/kayabaNerve/elliptic-curves", "https://github.com/monero-oxide/monero-oxide", "https://github.com/kayabaNerve/monero-oxide", + "https://github.com/rust-bitcoin/rust-bip39", "https://github.com/rust-rocksdb/rust-rocksdb", "https://github.com/serai-dex/patch-polkadot-sdk", ] diff --git a/patches/parity-bip39/Cargo.toml b/patches/parity-bip39/Cargo.toml new file mode 100644 index 00000000..3e444d8c --- /dev/null +++ b/patches/parity-bip39/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "parity-bip39" +version = "2.99.99" +description = "Patch back to the upstream library" +license = "MIT" +repository = "https://github.com/serai-dex/serai/tree/develop/patches/parity-bip39" +authors = ["Luke Parker "] +keywords = [] +edition = "2021" + +[package.metadata.docs.rs] +all-features = true +rustdoc-args = ["--cfg", "docsrs"] + +[workspace] + +[dependencies] +bip39 = { git = "https://github.com/rust-bitcoin/rust-bip39", commit = "f735e2559f30049f6738d1bf68c69a0b7bd7b858", default-features = false } + +[features] +default = ["bip39/default"] +alloc = ["bip39/alloc"] +std = ["bip39/std"] + +unicode-normalization = ["bip39/unicode-normalization"] +all-languages = ["bip39/all-languages"] + +zeroize = ["bip39/zeroize"] +rand_core = ["bip39/rand_core"] +rand = ["bip39/rand"] diff --git a/patches/parity-bip39/src/lib.rs b/patches/parity-bip39/src/lib.rs new file mode 100644 index 00000000..b9935270 --- /dev/null +++ b/patches/parity-bip39/src/lib.rs @@ -0,0 +1,3 @@ +#![cfg_attr(not(feature = "std"), no_std)] + +pub use bip39::*;