summa-tx / coins

Rust implementations of BIP32/39 and Ledger device comms
Other
90 stars 31 forks source link

chore: upgrade `k256` to 0.13 #114

Closed agostbiro closed 1 year ago

agostbiro commented 1 year ago

Upgrade motivated by https://github.com/gakonst/ethers-rs/issues/2158#issuecomment-1462927693.

The new k256 v0.13 brought two breaking changes for the bip32 crate:

The RecoverableSignature type has been removed which necessitated changes in the inherit_signer derive macro. Following the upgrade guide, I've replaced the DigestSigner<D, RecoverableSignature> implementation with DigestSigner<D, (Signature, RecoveryId)> that uses the new SigningKey::sign_digest_recoverable method. In order to preserve the recursive structure, I also added a sign_digest_recoverable method to the derive macro.

The VerifyingKey::to_bytes method has been renamed to VerifyingKey::to_sec1_bytes and I made the corresponding changes in the inherit_signer derive macro.

prestwich commented 1 year ago

example in rustdoc in bip32/src/lib.rs needs to be updated to the new idiom

prestwich commented 1 year ago

thank you! I'll notify the ethers project that they'll need to update for future versions

agostbiro commented 1 year ago

thanks!

gakonst commented 1 year ago

sick -ty