rust-bitcoin-unsafe-fast/bitcoin
merge-script 0b8c45ff8e
Merge rust-bitcoin/rust-bitcoin#3358: Add Xpriv::to_xpub and improve related method names
e215a39dba Improve documentation of Xpub::from_xpriv (Jiri Jakes)
0dcba98382 Add Xpriv::to_xpub (Jiri Jakes)
5a9341bfc5 Improve naming of methods on Xpub and Xpriv (Jiri Jakes)

Pull request description:

  Adds `Xpriv::to_xpub` and makes naming of methods related to extended and non-extended keys on `Xpub` and `Xpriv` consistent and easier to discover:

    - if method takes or returns extended key, its name uses `xpriv` or `xpub`
    - if method takes or returns non-extended key, its name uses `public_key` or `private_key`

  Previous naming of the methods was confusing and unclear and this PR deprecates them.

  Closes #3327.

  ### Notes for reviewers

    - `xpriv` and `xpub` could be without `x`, I opted for this version to remove any ambiguity
    - also considered `raw` or similar name (as suggested) for methods with non-extended keys, however `raw` is usually not used in this context and `to_public_key` vs. `to_x_only_public_key` did not look alright with any other name
    - if splitting this PR into two would be desirable, please let me know
    - is there a reason why `ckd_priv` is private and `ckd_pub` is public?

ACKs for top commit:
  apoelstra:
    ACK e215a39dba successfully ran local tests
  tcharding:
    ACK e215a39dba

Tree-SHA512: f76b22740b06df80dd9d01fbb991149243e47619e0bd5f1699b446456259cc6e97ecb9fca7b4881e921a9d7341ca92c6ee2dae90a417f702aff5eb760439ca42
2024-09-30 13:49:02 +00:00
..
contrib Add Arbitrary dependency 2024-08-23 15:39:20 -05:00
embedded Move opcodes to primitives 2024-07-09 15:26:33 +10:00
examples Improve naming of methods on Xpub and Xpriv 2024-09-29 11:07:32 +08:00
src Merge rust-bitcoin/rust-bitcoin#3358: Add Xpriv::to_xpub and improve related method names 2024-09-30 13:49:02 +00:00
tests Improve naming of methods on Xpub and Xpriv 2024-09-29 11:07:32 +08:00
CHANGELOG.md Capitalize Merkle 2024-07-01 17:42:43 +01:00
Cargo.toml Merge rust-bitcoin/rust-bitcoin#3375: Release tracking PR: `bitcoin-internals 0.4.0` 2024-09-23 18:32:23 +00:00