Commit Graph

6673 Commits

Author SHA1 Message Date
Jamil Lambert, PhD 3bcb5b0f8d
Add exclusions for match arm/guard mutants
cargo-mutants 25.0.1  introduced a new mutation pattern that deletes an
arm of a match statement or replaces a match guard with true and false.
These are applied in sections that have been excluded from mutation
testing and cause false positives.
The match patterns are also now stricter causing previously excluded
`impl` to be included.

Exclude the new match arm and guard mutation patterns.

Add `impl fmt::` versions for Debug and Display.
2025-04-29 11:23:02 +01:00
crStiv f31b7329c6 changed wording and punctuation
made a text look a little bit better
2025-04-29 09:29:40 +02:00
merge-script a9ddac178d
Merge rust-bitcoin/rust-bitcoin#4316: Improve the script hex APIs
5d5a19793a Run the formatter (Tobin C. Harding)
2b72f1f30b Make Lower/Upper hex print scripts with len prefix (Tobin C. Harding)
c27b95fb0d Make script to/from hex use consensus encoding (Tobin C. Harding)
f4bc58dc48 bitcoin: Add a script encoding example (Tobin C. Harding)

Pull request description:

  Done while investigating #3910 - this PR is quite invasive.

  - Patch 1 adds an example that shows the current behaviour of various API calls for converting scripts to/from hex.
  - Patch 2 adds a pair of functions that do not use the length prefix and makes script to/from_hex use the prefix.
  - Patch 3 makes `LowerHex` and `UpperHex` use the len prefix also
  - Patch 4 runs the formatter

  Explicitly keeps serde untouched - i.e., without the len prefix

ACKs for top commit:
  apoelstra:
    ACK 5d5a19793aae73ff09d7064455a1a995eb796c28; successfully ran local tests

Tree-SHA512: dbbec372ea7b01818fce68ffb807a4531f068e10147e8bedf37b77f66a068a628e380549c379c061b868973e97806ada59729248b03bbd1cf6809f6098170cb6
2025-04-28 21:01:50 +00:00
merge-script c01c6a3d69
Merge rust-bitcoin/rust-bitcoin#4403: docs: correction CHANGELOG.md
a232783d57 docs: correction CHANGELOG.md (Fallengirl)

Pull request description:

  fix `funtions` - `functions`
  no impact on functionality, local tests passed
  thx

ACKs for top commit:
  tcharding:
    ACK a232783d57
  jamillambert:
    ACK a232783d57
  apoelstra:
    ACK a232783d574fc9deef6beb51e67b6046600eb863; successfully ran local tests

Tree-SHA512: e850ee8b642df49e1b8fb1cf50aac4f55c86cc4f955aa28bc0493449769d5239a491fab5df02c7ade21a40c1efb7f4194fded29a418ae070b3e20aceb9d6dae3
2025-04-28 20:25:06 +00:00
merge-script f9bc0f517d
Merge rust-bitcoin/rust-bitcoin#4344: Locktime MtpAndHeight
8b47068a2e feat(locktime): implement MtpAndHeight structure and validation logic (aagbotemi)

Pull request description:

  This PR fixes #4299

  - Computed MtpAndHeight structure
  - Checked if relative time and height is satisfied by MtpAndHeight
  - Compared the Ordering of MtpAndHeight with time and height
  - Checked MtpAndHeight satisfaction and comparison in Locktime
  - Added unit tests for all the implementation

  I've reviewed and adhered to the contribution guidelines

ACKs for top commit:
  apoelstra:
    ACK 8b47068a2efada30aec21c61ae4be0da4d8e8fc8; successfully ran local tests
  Kixunil:
    ACK 8b47068a2e
  tcharding:
    ACK 8b47068a2e

Tree-SHA512: b00d1384d5deaa038b486ca9d77ad33cfa6cd8c987e08407863f2be8d540014bdcc971cd9d46acb51a2d105341accc04ba151e5cccb276e8352a5d45b33097eb
2025-04-28 13:49:12 +00:00
Tobin C. Harding 5d5a19793a
Run the formatter 2025-04-28 13:44:24 +10:00
Tobin C. Harding 2b72f1f30b
Make Lower/Upper hex print scripts with len prefix
Add the length prefix when formatting hex strings by way of `LowerHex`
and `UpperHex`.

This looses formatting options because I can't remember right now how
not to - again.
2025-04-28 13:43:07 +10:00
Tobin C. Harding c27b95fb0d
Make script to/from hex use consensus encoding
I'm not sure why we do not use consensus encoding currently for encoding
and decoding scripts to/from hex strings. Many tests include hard coded
hex which do not include the length prefix.

- Add a pair of encoding functions to encode/decode to/from hex without
the length prefix.
- Make `to_hex` and `from_hex` expect the length prefix i.e., use
consensus encoding.

This makes the API easier to use because the various encoding APIs can
be use together now eg `consensus::encode_hex` and `ScriptBuf::from_hex`.
2025-04-28 13:39:44 +10:00
Tobin C. Harding f4bc58dc48
bitcoin: Add a script encoding example
Our encoding/decoding support for scripts is currently a bit convoluted.
Add an example that shows how all the APIs go together.

Note this highlights a potential problem. `to_hex_string` is in
`bitcoin` and therefore has access to consensus encoding but does not
include the length prefix. This means that the output string from
`to_hex_string` cannot be parsed with
`consensus::encode::deserialize_hex` - which is surprising and has lead
to difficulty by at least one user trying to debug.
2025-04-28 13:38:12 +10:00
merge-script f740199d36
Merge rust-bitcoin/rust-bitcoin#4397: Automated weekly update to cargo-semver-checks (to 0.41.0)
0edb0f5380 Automated update to Github CI to cargo-semver-checks version-0.41.0 (Update cargo-semver-checks Bot)

Pull request description:

  Automated update to Github CI workflow `semver-checks.yml` by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  tcharding:
    ACK 0edb0f5380

Tree-SHA512: 80ce15d4a0f568a2303d06f8c6c426cea75f90c5bff6270ff2b27b93f09260c3765666da51c1a0575a0ce8d526a0f1ac2cf7771a09f989cc147aa4d267799978
2025-04-28 09:34:59 +10:00
Fallengirl a232783d57
docs: correction CHANGELOG.md 2025-04-27 09:12:50 +02:00
merge-script 269cd3ae35
Merge rust-bitcoin/rust-bitcoin#4401: Automated nightly rustfmt (2025-04-27)
6737c3a0e5 2025-04-27 automated rustfmt nightly (Fmt Bot)

Pull request description:

  Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

ACKs for top commit:
  apoelstra:
    ACK 6737c3a0e59173b11431bd0c31a1202ca4ce7369; successfully ran local tests

Tree-SHA512: d486efcc34aa7a3666ec421e8ae7d8f1d2f160a3ba8b086b70859f1da4fc03bb1399886370e09c26c57be98c20bdb865b86547f2f7dbcfcace2d34d486f842e0
2025-04-27 03:20:25 +00:00
Fmt Bot 6737c3a0e5 2025-04-27 automated rustfmt nightly 2025-04-27 01:36:56 +00:00
merge-script 1bee39bfe7
Merge rust-bitcoin/rust-bitcoin#4393: docs: Remove dead API documentation link in CONTRIBUTING.md
ab9f2fce9d removed API documentation section (Maximilian Hubert)

Pull request description:

  Removed API documentation section due to dead link - couldn't locate the referenced api folder or README file. Happy to restore this with correct link info if someone can provide the proper reference path. Just let me know!

ACKs for top commit:
  apoelstra:
    ACK ab9f2fce9d9750fe491bcd5cc663a598fd1f2dde; successfully ran local tests

Tree-SHA512: eb4887048f9d2e4bcb1b21947aac55c250fe369e5b9a3f07cc6f9ec7abd5716a4a45c6ac9e767808c5b1fa5f16f387e64a2ea3ccd997bf95fd3b19f669e1f249
2025-04-27 00:53:15 +00:00
merge-script 068d512d5e
Merge rust-bitcoin/rust-bitcoin#4398: Fix typo in result.rs documentation: "operatons" -> "operations"
d5f8a02b9b Update result.rs (leopardracer)

Pull request description:

  **Description:**
  This PR fixes a small typo in the documentation comment in units/src/result.rs where "operatons" was misspelled as "operations". This improves code documentation clarity and consistency.

  Changes:
  - Corrected spelling of "operatons" to "operations" in the documentation comment
  - No functional changes, documentation-only update

ACKs for top commit:
  apoelstra:
    ACK d5f8a02b9ba0f57e95375b8241826467b6b04b04; successfully ran local tests

Tree-SHA512: b9d6ea4c8d36e6a9f8d397b4db31d99f0b9d0101a0bef922f0c3832c501fbc773f8871c350ae8add47ab1f1c4d15806e1b1d9f0b9d7dd707b38adcc2afad8b34
2025-04-26 23:43:46 +00:00
merge-script 5871c51888
Merge rust-bitcoin/rust-bitcoin#4394: chore: fix docs for `WitnessProgram` and extend test for P2A
8eeceed450 test: extend `valid_v1_witness_programs` test to include P2A (Luis Schwab)
647526dd1d chore: fix docs for `impl WitnessProgram` and P2A (Luis Schwab)

Pull request description:

  Closes #4124.

  This PR fixes documentation on `impl WitnessProgram` by replacing instances of `address` to `[WitnessProgram]`, adds punctuation and capitalization where it was lacking and extends the `valid_v1_witness_programs` test to include the P2A output.

ACKs for top commit:
  Kixunil:
    ACK 8eeceed450
  apoelstra:
    ACK 8eeceed450f7414c8a286a9e47b6f04b652b18ef; successfully ran local tests

Tree-SHA512: 6e62a8de7135da04d6330d2b5596a2cd19da8a849f8c8c892f53578a8690152b23facf58149d4139ae088f1ab297d3526094617c3549e688819e9b1f3688de8b
2025-04-26 19:52:20 +00:00
merge-script 7e79a8b401
Merge rust-bitcoin/rust-bitcoin#4391: test: push minimality check for zero(empty)
afd4ec8c5e test: push minimality check for zero(empty) (ChrisCho-H)

Pull request description:

  Following https://github.com/rust-bitcoin/rust-bitcoin/pull/4368.
  I omitted to test OP_0(empty bytes) and can be covered by this PR.

ACKs for top commit:
  apoelstra:
    ACK afd4ec8c5e345a1df5abc46076c843e96a226b77; successfully ran local tests

Tree-SHA512: a3643227f9dfde71d5c5707bf11804e0e26eff43346c0443abdd805f0ffad284c3090e22a0bda34e54e1185a980adc7511724db401c04b55a8be79d67a3fce6d
2025-04-26 15:16:03 +00:00
Maximilian Hubert ab9f2fce9d removed API documentation section 2025-04-26 17:00:06 +02:00
leopardracer d5f8a02b9b
Update result.rs 2025-04-26 12:47:19 +03:00
Update cargo-semver-checks Bot 0edb0f5380 Automated update to Github CI to cargo-semver-checks version-0.41.0 2025-04-26 01:10:57 +00:00
merge-script 41e9976998
Merge rust-bitcoin/rust-bitcoin#4395: fix error in comment pow.rs
6ddbcb0283 fix error pow.rs (Alex Pikme)

Pull request description:

  hi! found typo

  Matagen -- typo
  Mutagen -- fix

ACKs for top commit:
  apoelstra:
    ACK 6ddbcb02834b1191e874b389d057a17b7b911ff1; successfully ran local tests

Tree-SHA512: deee4b2be35d0d786b7e4da7b9a662ba7ffe0503d13f374e712f5e2679ad679290470916da7ee3c64456d940b012a56fc42a28cd26a57e4889d047b14127c554
2025-04-25 15:50:59 +00:00
merge-script 12cef1d16b
Merge rust-bitcoin/rust-bitcoin#4389: Create impl_mul_assign and impl_div_assign macros
a92cc71f65 Create impl_mul_assign and impl_div_assign macros (Shing Him Ng)

Pull request description:

  The macros were called on type-rhs pairs that have an existing implementation of ops::Mul and ops::Div, respectively, that have an `Output` of `Self`

  Not as many types as I would have thought, but most of the operations result in a `NumOpResult`, which can't be then assigned back to the variable.

  Closes #4172

ACKs for top commit:
  apoelstra:
    ACK a92cc71f658771776557ea0a40d1d095d3b6d482; successfully ran local tests

Tree-SHA512: 30cfb077b9ba65af991eb17fa05ffc4a870c3f4ded746355d3a8577a71fe9a569588a882c2a936edcc9c88feede4d8bb1379a998e3f330894084a4e2fc434e6e
2025-04-25 14:08:00 +00:00
merge-script 872fc038fe
Merge rust-bitcoin/rust-bitcoin#4392: Fix minor typos and improve clarity in documentation and comments
c009a42e60 Update internal_macros.rs (GarmashAlex)
a4253fa5d9 Update mod.rs (GarmashAlex)
604b095540 Update serialize.rs (GarmashAlex)
024f87e655 Update error.rs (GarmashAlex)
1af34f92c5 Update message_compact_blocks.rs (GarmashAlex)
f554b01e82 Update params.rs (GarmashAlex)

Pull request description:

  This PR addresses several minor issues across the codebase, including:
  - Fixing typographical errors in comments and documentation (e.g., "deserilaization" → "deserialization", "send" → "sent").
  - Improving sentence clarity and grammar in doc comments (e.g., correcting sentence structure and word choice).
  - Enhancing code readability without changing any logic or functionality.

  These changes are purely cosmetic and aimed at improving maintainability and developer experience.

ACKs for top commit:
  apoelstra:
    ACK c009a42e60f0b4302506f5fc104af38a6c15be21; successfully ran local tests

Tree-SHA512: 915e2c9444d8f2810ba5cd51d3066685aea5a39d98303c793a854aea6da016cab2c457dd71c0b6549d29d6443db1292ebdb06d25f693741b2eca3979bf67cfab
2025-04-25 13:26:27 +00:00
aagbotemi 8b47068a2e
feat(locktime): implement MtpAndHeight structure and validation logic
- Add MtpAndHeight for relative locktime checks
- Include unit tests for time/height comparisons
- Fix API design for mtp_as_time() error handling
- Update documentation and dependencies
- Fix BlockTime, CI, remove Ordering, and PR discussion fixed
- Fix UTXO height and timestamps
- Fix: chain_state and utxo_state handled seperately for is_satisfied_by
- Fix: panic on overflow fixed with check_add
- Fix: documentation updated and trailing whitespaces removed
- docs(mtpheight): documentation updated
- used accessors to_height and to_mtp over From impl
2025-04-25 12:24:23 +01:00
Alex Pikme 6ddbcb0283
fix error pow.rs 2025-04-25 10:56:28 +02:00
Luis Schwab 8eeceed450
test: extend `valid_v1_witness_programs` test to include P2A 2025-04-24 22:51:41 -03:00
Luis Schwab 647526dd1d
chore: fix docs for `impl WitnessProgram` and P2A 2025-04-24 22:51:32 -03:00
merge-script aadea3eeb2
Merge rust-bitcoin/rust-bitcoin#4386: fix typo in serialized_signature.rs
3c6f45294b fix typo in serialized_signature.rs (Bilog WEB3)

Pull request description:

  `signtature` --> `signature` --fix typo

ACKs for top commit:
  apoelstra:
    ACK 3c6f45294bf3dcb7110bd60cb589241219bccc1a; successfully ran local tests

Tree-SHA512: c0d93efc95397eb6b817906ceef02083b529ef0f8b2d13afa675710d5ef78850dbcdc0e42f05a2956ba2949eb792cc92ff37359a540d246affec1f9604a44e1c
2025-04-24 19:40:12 +00:00
merge-script 5f4075a071
Merge rust-bitcoin/rust-bitcoin#4250: Introduce and use `test_hex_unwrap` macro in `internals`
d6296cd3d1 Remove usage of hex::test_hex_unwrap (Tobin C. Harding)
37035e20e8 Simplify and improve transaction benchmarks (Tobin C. Harding)

Pull request description:

  We have the `hex_lit` dependency for converting a hex string literal to an array.

  Currently we have a `test_hex_unwrap` macro in the `hex v0.3.0` release but not on either `master`
  or the upcoming `v1.0.0-alpha.0` release. This is making PRs around releasing and depending on the
  release more noisy than required.

  Introduce a `test_hex_unwrap` macro in internals for usage when the input is not a string literal.

  Use `hex_lit::hex` where possible (often needing an additional call to

ACKs for top commit:
  apoelstra:
    ACK d6296cd3d1989cf28d67a5329ad60da4f814ba92; successfully ran local tests
  Kixunil:
    ACK d6296cd3d1

Tree-SHA512: eab3573f6b7fee408ae11821b77e56cbaddf7cc4540bdc31ed7ef9eb3f25987f50e484f1553aaaa9709367e614eb77ed36250875d0faf5a51ab3fe709d4d4054
2025-04-24 17:19:37 +00:00
merge-script 04f706f6bd
Merge rust-bitcoin/rust-bitcoin#4383: rustdocs: Make headings consistent
c4d9c1b9f8 Use a consistent rustdoc heading level of H1 `#` (Jamil Lambert)
6325a7cdea Change rustdoc heading level of references (Jamil Lambert)
f22e997587 Use parameters instead of arguments in rustdocs (Jamil Lambert)
e2c7be6d2f Fix typo (Jamil Lambert)

Pull request description:

  In the rustdocs both `# Parameters` and `# Arguments` are used to mean the same thing.  In a previous PR #2792 it was decided to go with Parameters everywhere.  Since then there have been a few additions of "Arguments" into the rustdocs.

  There is also a mix in the usage of `#`, `##` or `###` for headings.  Noticed here https://github.com/rust-bitcoin/rust-bitcoin/pull/2792#issuecomment-2125775974.

   - Fix a typo found when looking into this.

   - Change all occurances to use `# Parameters` in rustdocs.

   - Change all heading levels to H1 `#`

   - Change all subheading levels to H3 `###` to make the small difference in the rendered font size noticable

  Closes #4380

ACKs for top commit:
  apoelstra:
    ACK c4d9c1b9f8e59bf795812c42bd1eee68d97b9bbd; successfully ran local tests

Tree-SHA512: c8cc77ccf7e2003dd2dd1d309268624576e3bf390cd8ac61b0a7bb1141ca05377c83627576b0b7ff258b8e51c2d255097a4363fbdd1b368db7d32ac32ece58a1
2025-04-24 16:44:17 +00:00
merge-script 4ad6e80683
Merge rust-bitcoin/rust-bitcoin#4382: Cleanup witness module
9eaaf114b0 fix(witness): remove explicit type (aagbotemi)
5b572c5976 docs(witness): use constructs instead of creates (aagbotemi)

Pull request description:

  This PR fixes #4379

  - Removed explicit type
  - updated documentation
  - PR is in two seperate patches

ACKs for top commit:
  apoelstra:
    ACK 9eaaf114b0d6afb810cec8e9dac603ecadf64ff4; successfully ran local tests

Tree-SHA512: 65a6ca880c64aa81d83dffbfcd21a0427c874237a606d82ab70f226839adb164c9ee7fd1ecd5d8cee662660efcd1c458c523a27964cd1d00704d40a3bb6a1deb
2025-04-24 14:51:02 +00:00
GarmashAlex c009a42e60
Update internal_macros.rs 2025-04-24 16:46:01 +03:00
GarmashAlex a4253fa5d9
Update mod.rs 2025-04-24 16:40:00 +03:00
GarmashAlex 604b095540
Update serialize.rs 2025-04-24 16:37:25 +03:00
GarmashAlex 024f87e655
Update error.rs 2025-04-24 16:30:44 +03:00
GarmashAlex 1af34f92c5
Update message_compact_blocks.rs 2025-04-24 16:28:38 +03:00
merge-script 39f5075708
Merge rust-bitcoin/rust-bitcoin#4381: Make Version::maybe_non_standard and Version::is_standard const
6370aac7e1 Make Version::maybe_non_standard and Version::is_standard const (Shing Him Ng)

Pull request description:

  Closes #4206

ACKs for top commit:
  apoelstra:
    ACK 6370aac7e119042d8b6b40021bbcd6324ad02bbb; successfully ran local tests

Tree-SHA512: aaf6afbe39d6568e0d05776a2a2f58a9a657f28cd3942391b599390bb4db974684e7d76cdf8db51a0fbcb948cdc4e19f22ba4b8ca39537e162cbd5bb2d4cd40e
2025-04-24 13:23:17 +00:00
GarmashAlex f554b01e82
Update params.rs 2025-04-24 15:53:27 +03:00
ChrisCho-H afd4ec8c5e test: push minimality check for zero(empty) 2025-04-24 20:52:37 +09:00
merge-script 561e3aa026
Merge rust-bitcoin/rust-bitcoin#4385: controlblock::decode unused variant
dedb42dd71 fix(taproot): remove unused error variant - clippy::enum_variant_names allow attribute added - cargo formatting changes reversed (aagbotemi)

Pull request description:

  This PR removed unused variant from `TaprootError`, also allow `clippy::enum_variant_names` attribute for TapError (this will help to prevent Clippy Build Error). Another way to fix the clippy build error is to change the variants name, but I think the attribute is better

  Fixes #4360

ACKs for top commit:
  apoelstra:
    ACK dedb42dd7178774cea6ce92d25d7519de52c2526; successfully ran local tests
  Kixunil:
    ACK dedb42dd71

Tree-SHA512: ff4c2cb5a8e22a05147db15afc449494460ae788a9cb644cc1140cf1b30777a2ac7b5921113da0dc745471357c081793b32e879e6ff29f9bd5769d0ff9292dd8
2025-04-23 17:19:11 +00:00
aagbotemi dedb42dd71
fix(taproot): remove unused error variant
- clippy::enum_variant_names allow attribute added
- cargo formatting changes reversed
2025-04-23 15:51:09 +01:00
Shing Him Ng a92cc71f65 Create impl_mul_assign and impl_div_assign macros
The macros were called on type-rhs pairs that have an existing
implementation of ops::Mul and ops::Div, respectively, that have an
`Output` of `Self`
2025-04-22 22:50:09 -05:00
merge-script 319e87c07c
Merge rust-bitcoin/rust-bitcoin#4376: primitives: replace error propagation with `expect`
cf42c511d8 primitives: replace error propagation with `expect` (Andrew Poelstra)

Pull request description:

  This error path cannot happen, and if it could, failing formatting is not the correct source of action, because the std docs say that formatting may only fail if the formatter says so.

  Fixes comment in #4269

ACKs for top commit:
  tcharding:
    ACK cf42c511d8
  Kixunil:
    ACK cf42c511d8

Tree-SHA512: 0ad47bb210dc71568bde426b8fd7782a4d48415fbf27133783975117d174b58eb791e68290e53f150a7e65236efda75032852bb6ed30bf4a182f18b9440cfcf9
2025-04-22 18:48:53 +00:00
merge-script 9c80eb077a
Merge rust-bitcoin/rust-bitcoin#4365: Implement FromIterator for Witness
6bd7dc6980 feat(witness): implement FromIterator for Witness with unit test (aagbotemi)

Pull request description:

  This PR implements the FromIterator trait for the Witness struct, addressing issue #4351.

  Changes:
  - Added FromIterator<T: AsRef<[u8]>> implementation for Witness, allowing for convenient creation of Witness from iterators
  - Added unit test to verify the implementation works correctly

  This PR fixes #4351

ACKs for top commit:
  tcharding:
    ACK 6bd7dc6980
  apoelstra:
    ACK 6bd7dc69802ad809492fe44d8d87c4b287f93676; successfully ran local tests

Tree-SHA512: 660196c5027fb9270f9ae5c4e08eab6baa2afbdf19a2220b4777303f71f6802bd7ed5e1512af8ee14654b1249ec22606ea817951befbe85b13f9f285b3ebae12
2025-04-22 16:48:23 +00:00
Andrew Poelstra a66ad97fb6
bip32: split InvalidChildNumber and InvalidChildNumberFormat out of error
Currently in this module we have a distinction between an "index" which
is a number between [0, 2^31 - 1] which indexes into the set of normal
or hardened child numbers. We also have a child *number*, which within
the library is an opaque type, but can be freely converted into/out of a
u32 in the consensus encoding which uses the MSB as a normal/hardened
flag and the other bits to encode the index.

Probably we want to change ChildNumber::From<u32> to some sort of
from_consensus_u32 method, but that's out of scope for this PR. What is
*in scope*, though is fixing the error types.

In the existing code we have three problems:

* Our error type for a bad index is called InvalidChildNumber, rather
  than InvalidIndex, and the error message reflects this, which is wrong
  and confusing. (Some with InvalidChildNumberFormat.)
* The InvalidChildNumberFormat is always constructed from a ParseIntError
  from stdlib, but we always throw that away rather than preserving it.
* These two error variants only appear when parsing child numbers, or
  derivation paths which are lists of child numbers, but they are part
  of the main error enum.
2025-04-22 14:46:34 +00:00
Andrew Poelstra a891fb9b74
bip32: remove unused error variants 2025-04-22 14:46:18 +00:00
Andrew Poelstra f0a237c001
bip32: split out DerivationError from the main error enum
This is a breaking change to the API of the deprecated `derive_pub`
function, but it's in a way that's unlikely to break consumers (who are
probably just .expect'ing the result) so we will retain the deprecated
function.
2025-04-22 14:45:57 +00:00
Andrew Poelstra 32d96f6c33
bip32: make Xpriv::new_master be infallible
The only error path for this is cryptographically unreachable and was
removed in a previous commit.
2025-04-22 14:45:36 +00:00
Andrew Poelstra 0e5e021b69
bip32: change several cryptographically unreachable paths to expects
These paths cannot be reached. In general, key derivation cannot fail
for cryptographic reasons.
2025-04-22 14:44:46 +00:00
Bilog WEB3 3c6f45294b
fix typo in serialized_signature.rs 2025-04-22 16:15:02 +02:00