rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra 07a5cccd42
Merge rust-bitcoin/rust-bitcoin#1582: Take `Into<secp256k1::PublicKey>` in PublicKey constructors
1d3d5a9c5b Take Into<secp256k1::PublicKey> in PublicKey constructors (Tobin C. Harding)
b13a76407b keys: Clean up test imports (Tobin C. Harding)

Pull request description:

  We can make the API more ergonomic by taking a generic argument that implements `Into<secp256k1::PublicKey>` in the `bitcoin::PublicKey` constructors.

  The only thing than this is useful for is passing in `KeyPair` and the `From` implementation already exists. Add a unit test to verify.

  Fix: #1453

  ## Note

  As per the discussion in #1453 I checked secp and bitcoin for all keys that can be converted using `From` and it turns out its only `KeyPair` which already has `From` impls - good rust-bitcoin devs :)

ACKs for top commit:
  Kixunil:
    ACK 1d3d5a9c5b
  apoelstra:
    ACK 1d3d5a9c5b

Tree-SHA512: b5e5272561de15cdcfb15913aa5d42ddc96bf2fd5835068a5a9aa0274074ffa698ec9e81707f102b7d1b244f1abd0fdbd0eb4b6b505c84c3d5719dcb01d46efb
2023-01-24 15:03:06 +00:00
..
contrib Remove rand-std dev-dependency from secp256k1 2022-12-23 08:33:21 +11:00
embedded Patch hashes and update the code 2022-12-18 14:33:55 +01:00
examples Use marker type to enforce validation of `Address`'s network 2023-01-11 19:27:10 +08:00
fuzz Use marker type to enforce validation of `Address`'s network 2023-01-11 19:27:10 +08:00
src Merge rust-bitcoin/rust-bitcoin#1582: Take `Into<secp256k1::PublicKey>` in PublicKey constructors 2023-01-24 15:03:06 +00:00
tests Use as_ref() instead of costly clone() 2023-01-09 23:17:04 -05:00
CHANGELOG.md add some documentation clarifying the locktime ordering shenanigans in #1330 2022-12-15 23:12:03 +00:00
Cargo.toml bip158: Replace usage of HashSet with BTreeSet 2023-01-23 08:38:08 +11:00
build.rs Implement consensus encoding adapter for serde 2022-12-02 10:48:05 +01:00