rust-bitcoin / rust-secp256k1

Rust language bindings for Bitcoin secp256k1 library.
Creative Commons Zero v1.0 Universal
351 stars 270 forks source link

Create `Party` enum and deprecate `ElligatorSwiftParty` in favor of it #752

Closed shinghim closed 1 month ago

shinghim commented 1 month ago

The initial naming of ElligatorSwiftParty wasn't very descriptive, so it will be deprecated in favor of a more descriptive Party enum. I updated shared_secret and shared_secret_with_hasher to accept the new Party enum as well - I'm not sure if there's a better way to do it, but changing it to an impl Into<Party> should preserve backwards compatibility

Fixes #741

apoelstra commented 1 month ago

Also, we should consider backporting this to the version used by rust-bitcoin 0.32.

tcharding commented 1 month ago

This PR is doing two things, one of which is not in the title so is obfuscated. Please either do two separate PRs or describe the whole change set (probably still requires two patches).

shinghim commented 1 month ago

@tcharding done

tcharding commented 1 month ago

The deprecation stuff is particularly nice, well thought out.

apoelstra commented 1 month ago

~3b7d3938873eb62406dd4d52094deeabddb0074f is still in the PR.~ lemme check why clippy is running locally on this commit even though it's not the tip..

apoelstra commented 1 month ago

Lol, there we go, I got it.

I had been sorting commits alphabetically instead of topologically when deciding what the "tip" was.