zcash / librustzcash

Rust-language assets for Zcash
Other
333 stars 249 forks source link

Migrate from `hdwallet` to `bip32` #1407

Closed str4d closed 3 months ago

str4d commented 3 months ago

The hdwallet crate depends on ring 0.16, while most of the rest of the crates we depend on use ring 0.17. We have been waiting for eight months for hdwallet to merge the PR updating dependencies (https://github.com/jjyr/hdwallet/pull/21), without response.

I noticed that the only reason hdwallet depends on ring is for SHA-256 and HMAC. These could instead be sourced from the Rust Crypto crates sha2 and hmac. While looking into that, I found the bip32 crate, which provides a very similar API to hwallet but using pure-Rust crates (or optionally the secp256k1 crate, which is what we want).

We should migrate from hdwallet to bip32, both to consolidate our dependencies and consolidate our dependency maintainers.