Commit Graph

4149 Commits

Author SHA1 Message Date
Andrew Poelstra f260b097f4
Merge rust-bitcoin/rust-bitcoin#2830: Fix Rustdocs warnings in `just check-api`
a09c3c5225 Check API: remove false positives on rustdoc (Jose Storopoli)

Pull request description:

  Fixes the rustdocs build warnings.
  This PR is composed by two commits:

  - Updates `contrib/check-for-api-changes.sh` to ignore
    `rustdoc::broken_intra_doc_links` due to the features being turned on and off
    (see rationale below); and
  - Adds a `just doc` quick check that will check for all missing rustdoc broken links
    to counterbalance the allow flag above.

  As jyap808 has pointed out in #2800,
  we might not have a simple fix for these rustdoc build warnings inside the `just check-api`.
  This can be mitigated by adding a simple allow flag to `RUSTDOCFLAGS` in `contrib/check-for-api-changes.sh`.

  > Took a quick look at this. Not sure if there's anything obvious to fix.
  >
  > A few warnings mentioning [`ordered::ArbitraryOrd`] which is only enabled when the "--features ordered" flag is used. No warning when the flag is enabled. Generated docs look OK.
  >
  > jyap808 in #2800

  Closes #2800.

  I don't know if this is the intended solution, or if we want to add more CI checks for the docs.
  Note that these docs checks are already covered in `rust-bitcoin/rust-bitcoin-maintainer-tools`: 3494ceec52/ci/run_task.sh (L275-L278)

  Any feedback will be appreciated.

ACKs for top commit:
  apoelstra:
    ACK a09c3c5225
  tcharding:
    ACK a09c3c5225

Tree-SHA512: d8a4a14a220d907a072fb283075c168e8264d01e73bf6b600f9c562337836ff6ea47cd0ab326bebd997522d5fdf32ae5a9b82c6951741595ec41c13ad49bc2ce
2024-06-07 16:51:58 +00:00
Andrew Poelstra 8dbc990448
Merge rust-bitcoin/rust-bitcoin#2832: Standardized rustdoc style
5e7a638b4d fix crypto rustdocs (Jamil Lambert, PhD)
bac30d3e6e fix rustdocs in bip152 (Jamil Lambert, PhD)
4a9f74b55c fix missing fullstops in bitcoin rustdoc (Jamil Lambert, PhD)

Pull request description:

  Updated some of the rustdocs to make the style consistent.  There is still more to do which I can work on if it is useful?

ACKs for top commit:
  tcharding:
    ACK 5e7a638b4d
  apoelstra:
    ACK 5e7a638b4d

Tree-SHA512: 3813900d4f15e95a290286a4d9efd8010625150a09dd4f601ab6279e3e0bd5cfa8b2f1628543d7279b4b26f1e7e85d10338d3401a7b6e9794684d02fa0e8fda1
2024-06-07 16:15:36 +00:00
Andrew Poelstra 7a93f78e3f
Merge rust-bitcoin/rust-bitcoin#2841: fuzz: add more coverage for `deserialize_psbt`
55cbae9c2f fuzz: add more coverage for `deserialize_psbt` (Bruno Garcia)

Pull request description:

  This PR adds more coverage for `deserialize_psbt` harness. It uses the `data` to create more than one psbt and then combine them.

ACKs for top commit:
  apoelstra:
    ACK 55cbae9c2f yeah, I like this

Tree-SHA512: 568899be8a82595c07e7b47c3011c093ce4ce49962e14781ea0c2eb9608fbba9920bbc81a296ec49d6ca124b813715bc0b8eb0cf887d44bbf8190f9a10c18845
2024-06-07 15:14:07 +00:00
Bruno Garcia 55cbae9c2f fuzz: add more coverage for `deserialize_psbt` 2024-06-06 13:49:32 -03:00
Jamil Lambert, PhD 5e7a638b4d fix crypto rustdocs
Fixed the rustdocs for some of the functions to be in third person, and small gramatical changes.
2024-06-06 16:54:02 +01:00
Jamil Lambert, PhD bac30d3e6e fix rustdocs in bip152
Added backticks on links and changed to third person on function rustdocs
2024-06-06 16:37:12 +01:00
Jamil Lambert, PhD 4a9f74b55c fix missing fullstops in bitcoin rustdoc
Added missing fullstops to the rustdoc titles for everything on the main page of the bitcoin crate
2024-06-06 16:37:12 +01:00
Andrew Poelstra 160f6de4b6
Merge rust-bitcoin/rust-bitcoin#2747: bitcoin: Add PSBT multiple inputs examples
34a5da5f16 bitcoin: Add Taproot PSBT multiple inputs examples (Jose Storopoli)
b8dc0617c9 bitcoin: Add ECDSA PSBT multiple inputs examples (Jose Storopoli)

Pull request description:

  Adds examples on how to create,
  update, sign, and finalize PSBTs version 0
  that deals with multiple inputs.

  Examples are SegWit V0 and Taproot.

ACKs for top commit:
  tcharding:
    ACK 34a5da5f16
  apoelstra:
    ACK 34a5da5f16 nice!

Tree-SHA512: de5717920923e7143e395cbcf143892527e0e794931974eb579db19c17fe0914e630849a0c0581c608909b2cfacfed35df5298605aaa3c9bbd4833985677cf42
2024-06-06 12:52:15 +00:00
Andrew Poelstra 2cfe0e204d
Merge rust-bitcoin/rust-bitcoin#2834: pow: Fix off-by-one error
3298c0c4b5 pow: Unit test from_hex_internal (Tobin C. Harding)
47e4bff0ee pow: Fix off-by-one error (Tobin C. Harding)

Pull request description:

  Patch 1 adds the fix, patch 2 is a unit test that fails if move to the front.

ACKs for top commit:
  apoelstra:
    ACK 3298c0c4b5 nice find! and lucky this just returns an error rather than panicking. may be worth backporting nonetheless
  brunoerg:
    ACK 3298c0c4b5

Tree-SHA512: 15bbd5aa4ac62c91492f5394444d179d95770bae822422bf00bb62896dcaf6c92d32f7d2e3380c352ff7242422ec6af6ff637ff78d14406cd047ef4ad5f22649
2024-06-05 13:18:03 +00:00
Jose Storopoli 34a5da5f16
bitcoin: Add Taproot PSBT multiple inputs examples 2024-06-05 13:11:28 +00:00
Jose Storopoli b8dc0617c9
bitcoin: Add ECDSA PSBT multiple inputs examples 2024-06-05 13:11:25 +00:00
Jose Storopoli a09c3c5225
Check API: remove false positives on rustdoc 2024-06-05 11:44:05 +00:00
Tobin C. Harding 3298c0c4b5
pow: Unit test from_hex_internal
Add a unit test that fails if put before the "pow: Fix off-by-one error"
patch. Tests that we can correctly parse a 32 character long hex string
into a `U256`.
2024-06-05 09:44:23 +10:00
Tobin C. Harding 47e4bff0ee
pow: Fix off-by-one error
Length check has an off-by-one error in it, we want the check it include
hex strings of length 32 (eg, 128 bytes).
2024-06-05 08:39:47 +10:00
Andrew Poelstra 741589c5ad
Merge rust-bitcoin/rust-bitcoin#2828: fuzz: add more coverage for `deserialize_block`
ee30eaa81b fuzz: add more coverage for `deserialize_block` (Bruno Garcia)

Pull request description:

  This PR adds more coverage for the `deserialize_block` target. First, it serializes the block and compares with the data provided and then call some block functions to ensure they run without any issue.

ACKs for top commit:
  apoelstra:
    ACK ee30eaa81b Thanks!

Tree-SHA512: db6c7befa7b429267e9b28fb7910d2b9e8d462e22c791b544b1aa528c7ba4f8e1cd32e1276c67d3da1f97ce484e7ed19ec20b10d2030f2977fd8f855cf510ffe
2024-06-03 13:57:09 +00:00
Tobin C. Harding 4ce7ee179a
Merge rust-bitcoin/rust-bitcoin#2826: Automated daily update to rustc (to nightly-2024-06-02)
5cff6b4765 Automated update to Github CI to rustc nightly-2024-06-02 (Update Nightly Rustc Bot)

Pull request description:

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

ACKs for top commit:
  tcharding:
    ACK 5cff6b4765

Tree-SHA512: 02513ed90221b2a31a3cc839dde89eb0239d3537ce19bd32bbc4541f58469a9d88de57e921fea3d653b0f52405b94677ea4470d469ae5f7ace463611be7cd9cd
2024-06-03 12:09:45 +10:00
Update Nightly Rustc Bot 5cff6b4765 Automated update to Github CI to rustc nightly-2024-06-02 2024-06-03 01:23:52 +00:00
Bruno Garcia ee30eaa81b fuzz: add more coverage for `deserialize_block` 2024-06-02 15:44:35 -03:00
Andrew Poelstra db9a1a41d3
Merge rust-bitcoin/rust-bitcoin#2825: Automated nightly rustfmt (2024-06-02)
07ef78ea96 2024-06-02 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 07ef78ea96

Tree-SHA512: 55aa43a0a1e3bc4d65246f949d91a56ab758488e7c2633f81735eab39c0f739d2b4ac180d69352e8a3296256fb5a5d1a16d434f7997e4d86143abdd68581076e
2024-06-02 16:32:29 +00:00
Fmt Bot 07ef78ea96 2024-06-02 automated rustfmt nightly 2024-06-02 01:07:10 +00:00
Andrew Poelstra ee68e80315
Merge rust-bitcoin/rust-bitcoin#2535: Move `read_scriptint` to `PushBytes` & create `read_int` function
d6ef16af30 update api (Divyansh Gupta)
a336ec0dda refactor(script): move `read_scriptint` to `PushBytes` & create `read_int` function (Divyansh Gupta)

Pull request description:

  * Moved `read_scriptint` method to `Push_Bytes` struct
  * Created `Instruction::read_int` method which acts as a wrappper around this  function.

  Done as part of #1547

ACKs for top commit:
  apoelstra:
    ACK d6ef16af30
  tcharding:
    ACK d6ef16af30

Tree-SHA512: e33df8adcb1c23351da303f6bad1ea4a8eae30e65943d230ae886183a01f970aecd0c8c8fd3a6c337cfe6dde1b7590778d88c308415e393f137065ef7da4b29c
2024-06-01 22:38:44 +00:00
Andrew Poelstra 6cfdbc978a
Merge rust-bitcoin/rust-bitcoin#2819: docs: Add more info to the update api files section
0ae5be3e42 docs: Add more info to the update api files section (Tobin C. Harding)

Pull request description:

  Done to try to further help new contributors and save maintainer time.

  Add an example of using `just check-api` and an example `git` command for devs to create the api patch now required for all changes to the public API.

ACKs for top commit:
  apoelstra:
    ACK 0ae5be3e42

Tree-SHA512: 042dad94c1887fcfad535b1eb51cb38a450f3928742d0887c8470888ba53cf79687b65cf7040bdcbe4ce4d49a843f66f198139c22d4f3c4d2689b94b946e6929
2024-06-01 14:52:22 +00:00
Andrew Poelstra 0d1cab68ee
Merge rust-bitcoin/rust-bitcoin#2644: Add HKDF to bitcoin_hashes
c9d1ff7037 Update hashes API changes (Nick Johnson)
878ab924d1 Add HMAC Extract-and-Expand Key Derivation Function (Nick Johnson)

Pull request description:

  rustaceanrob and I have been working on a Rust-based BIP324 implementation over at https://github.com/rustaceanrob/bip324. We have been attempting to keep the code pretty clean in hopes of a future "soft landing" in rust-bitcoin. I figured the HKDF implementation is a small, self-contained chunk that might allow us to learn the ropes here first.

  There was a mention in the [discussion thread on BIP324](https://github.com/rust-bitcoin/rust-bitcoin/discussions/1691) that the hashes interface may be changing in the near future. I am not sure the effect that would have on this implementation, but happy to work through any issues.

  Closes #2551

ACKs for top commit:
  tcharding:
    ACK c9d1ff7037
  apoelstra:
    ACK c9d1ff7037

Tree-SHA512: 404d51ca055db4366ec57f1503fcf350aebcd181f36a20a17763ea8c47ade851213fc882acd2785313953a3e768d588c230f737ff93f88121b97c34b37c65127
2024-05-31 22:13:08 +00:00
Tobin C. Harding 0ae5be3e42
docs: Add more info to the update api files section
Done to try to further help new contributors and save maintainer time.

Add an example of using `just check-api` and an example `git` command
for devs to create the api patch now required for all changes to the
public API.
2024-06-01 05:08:32 +10:00
Andrew Poelstra 21cd53a1c8
Merge rust-bitcoin/rust-bitcoin#2818: CI: Remove shebang from non-executable scripts
60ab3d26e5 CI: Remove shebang from non-executable scripts (Tobin C. Harding)

Pull request description:

  Some of our CI shell scripts are meant only to be sourced and not run directly however they include an initial shebang line, implying that they should be run.

  Remove the shebang line from `crates.sh` and the various `test_vars.sh` scripts. Add a `shellcheck` directive to inhibit the no-shebang warning.

  Please note, the issue mentions the following in the discussion thread and it is _not_ implemented here.

  > It would be good also to find a way to detect whether the script is being run directly, and to print an error message. I'm sure this is a common thing and we can find a stackexchange post telling us how to do it.

  I don't see an immediate way to do this because CI is run using `run_task.sh` which is not in this repo. And since one can still run a script without the shebang (by doing eg, `bash script.sh`) the lack of shebang is only an indicator of how we are using the script.

  Fix: #2764

ACKs for top commit:
  apoelstra:
    ACK 60ab3d26e5

Tree-SHA512: fe829226fb50e88bb84a2bbe324fbf977b7d5abc3637e9b7f8148e74a45a995b526bbe8c7263d903fd03f4563cdf95887433daa76f81faa7cd88d830bf6e0205
2024-05-31 18:37:06 +00:00
Tobin C. Harding 60ab3d26e5
CI: Remove shebang from non-executable scripts
Some of our CI shell scripts are meant only to be sourced and not
run directly however they include an initial shebang line, implying that
they should be run.

Remove the shebang line from `crates.sh` and the various `test_vars.sh`
scripts. Add a `shellcheck` directive to inhibit the no-shebang warning.

Fix: #2764
2024-05-31 10:10:00 +10:00
Nick Johnson c9d1ff7037 Update hashes API changes 2024-05-30 15:50:51 -07:00
Nick Johnson 878ab924d1 Add HMAC Extract-and-Expand Key Derivation Function
BIP324's peer to peer encryption protocol requires an HMAC-based extract
and expand key derivation function (HKDF). HKDFs were not part of many
bitcoin protocols before BIP324, but the hope is that the encrypted
protocol becomes the dominant standard justifying this implementation.
2024-05-30 15:12:18 -07:00
Tobin C. Harding 3c87d0c5a3
Merge rust-bitcoin/rust-bitcoin#2745: Automated daily update to rustc (to nightly-2024-05-29)
4137c5c7a2 Automated update to Github CI to rustc nightly-2024-05-29 (Update Nightly Rustc Bot)

Pull request description:

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

ACKs for top commit:
  tcharding:
    ACK 4137c5c7a2

Tree-SHA512: 022339e41f69f1d8518cd8902fbe3fab329df8564366d2ea8d4fe47337693ca7a344d1d799aa8db1235bc45e87c6f70f172efbd75b80a7a3ad79293b8e0fe4e5
2024-05-31 08:00:29 +10:00
Andrew Poelstra aabaf6f2a3
Merge rust-bitcoin/rust-bitcoin#2815: Add `const` modifier to `Magic::from_bytes`
d2be969a51 Add `const fn Magic::from_bytes` patch for API files (Velnbur)
b7458256af Add `const` modifier to `Magic::from_bytes` (Velnbur)

Pull request description:

  Resolves: rust-bitcoin/rust-bitcoin#2814

ACKs for top commit:
  apoelstra:
    ACK d2be969a51

Tree-SHA512: 4e8f24b665a2919bcf135333be097114d72f473684b14a8fdd4e8d82bf57e89b4166352f75f744105f76eddc9ffabcb07971a669a7c93dfff6928a3fe519a38f
2024-05-30 16:34:53 +00:00
Andrew Poelstra 22e244c84c
Merge rust-bitcoin/rust-bitcoin#2615: units: Add BlockHeight and BlockInterval types
eb723740f1 api: Run just check-api (Tobin C. Harding)
853026071f bitcoin: Use new BlockHeight and BlockInterval types (Tobin C. Harding)
1173f3fbff units: Add BlockHeight and BlockInterval types (Tobin C. Harding)

Pull request description:

  Add two simple integer wrapper types for abstracting over block height (from genesis block) and block interval.

  This does not include hex because block height is typically written in decimal.

  These types are very thin wrappers, their usecase is to assist in code readability instead of enforcing any logic.

  Based on discussion in #2533

  Close: #2532

ACKs for top commit:
  apoelstra:
    ACK eb723740f1

Tree-SHA512: e6ae637461a813022e5236622143c658ac731730cb568c14c90cb358ed40452609d0e815ea99619ad7a2ea36f8dd053094b55f09b267e9a7cf5bab73cd3f81c8
2024-05-30 15:02:00 +00:00
Velnbur d2be969a51
Add `const fn Magic::from_bytes` patch for API files
To reflect changes from b7458256af
2024-05-30 13:23:37 +03:00
Velnbur b7458256af
Add `const` modifier to `Magic::from_bytes`
Resolves: rust-bitcoin/rust-bitcoin#2814
2024-05-30 12:58:29 +03:00
Tobin C. Harding eb723740f1
api: Run just check-api 2024-05-30 16:50:02 +10:00
Tobin C. Harding 853026071f
bitcoin: Use new BlockHeight and BlockInterval types
We just added to now types that are thin wrappers around `u32`s for
block heights and intervals.

Add `Encodable` and `Decodable` impls and use the new types. While we
are at it re-export the types from the crate root so users don't have to
dig into the `units` crate.
2024-05-30 16:49:30 +10:00
Tobin C. Harding 1173f3fbff
units: Add BlockHeight and BlockInterval types
Add two simple integer wrapper types for abstracting over block
height (from genesis block) and block interval.

This does not include hex because block height is typically written in
decimal.

These types are very thin wrappers, their usecase is to assist in code
readability instead of enforcing any logic.
2024-05-30 16:49:30 +10:00
Update Nightly Rustc Bot 4137c5c7a2 Automated update to Github CI to rustc nightly-2024-05-29 2024-05-30 01:21:58 +00:00
Andrew Poelstra b0870634f0
Merge rust-bitcoin/rust-bitcoin#2813: api: Run just check-api
18d298ab4f api: Run just check-api (Tobin C. Harding)

Pull request description:

  During a bunch of merges the api/ files have gotten out of sync.

  Run just check-api, no other changes.

ACKs for top commit:
  apoelstra:
    ACK 18d298ab4f

Tree-SHA512: 44d8f691e0ef919b851c43e19ffa28c48598163be056ef95498b5b868a57f83a274e6b69b5172417ac8ef61d56b4d16ed99a91b4e9b5bb9261750afeda301cfa
2024-05-29 23:20:40 +00:00
Tobin C. Harding 18d298ab4f
api: Run just check-api
During a bunch of merges the api/ files have gotten out of sync.

Run just check-api, no other changes.
2024-05-30 07:34:29 +10:00
Andrew Poelstra 3c7ac53e89
Merge rust-bitcoin/rust-bitcoin#2715: psbt: Use macro to hash instead of relying on `Hash` trait
9e4b092fce psbt: Use macro instead of function (Tobin C. Harding)

Pull request description:

  We have a private function that makes use of the `Hash` trait to generically hash map entries. This usage makes patching the `hashes` module difficult. We can achieve the same thing by using a macro and passing in the concrete type.

  This is an internal change, no effect on logic or public API.

ACKs for top commit:
  apoelstra:
    ACK 9e4b092fce

Tree-SHA512: 8b788fa91d21bbae556c746c2e55e6e9395e022bedf13193555ef7482109b6ef5032b233c5f37543a31ebda49d9b4761c161ca0db501472047eb661a48e944b7
2024-05-28 16:54:13 +00:00
Andrew Poelstra 65a5dfcd6b
Merge rust-bitcoin/rust-bitcoin#2585: Improve array macros
6ba7758b30 Improve array macros (Tobin C. Harding)

Pull request description:

  Currently we have two macros used when creating array wrapper types, one is in `internals` and the other in `bitcoin::internal_macros`. It is not immediately obvious what is what and why there are two.

  Improve the macros by:

  - Move the inherent functions to `impl_array_newtype`
  - Use `*_byte_array` for the names instead of `*_bytes`
  - Re-name the other macro to match what it now does

ACKs for top commit:
  apoelstra:
    ACK 6ba7758b30

Tree-SHA512: 36ed0fae0d28f24d29287062eb05bbc1e9e8b565f4ff41fd893503a25404ed8e185a34d75e398a8a660923ffda3b832b6157011598d5a75a5c4aafdffc74af2a
2024-05-28 16:25:59 +00:00
Andrew Poelstra 6d06a32d9c
Merge rust-bitcoin/rust-bitcoin#2755: Fix units public re-exports
d2a597c90d unit: Group re-exports (Tobin C. Harding)
d242125ae4 units: Fix error re-exports (Tobin C. Harding)

Pull request description:

  First patch is the meat and potatoes, second one is just a trivial refactor to the same code, done separately so as to make the changes in the first patch more clear.

  From patch 1
  ```
      units: Fix error re-exports

      Currently we re-export two error types at the crate root, this is
      surprising because:

      - Why not none or all the rest?
      - Why these two?

      Observe that the `ParseIntError` is special in that it is used by
      other modules so its good to have at the crate root (other errors are
      expected to be used with a module prefix eg, `amount::ParseError`).

      There is no obvious reason why `ParseAmountError` is re-exported.

      Comment and doc inline the `ParesIntError`, remove the re-export of
      the `ParseAmountError`.
  ```

ACKs for top commit:
  apoelstra:
    ACK d2a597c90d

Tree-SHA512: 38d3f590357e66d07cbd7fedff134c39e0920e076ea99cb34ba276749a14695d428345d7b0f9ec8222f7899cb57e7c97068d3b6e7b2a9be25a0278e0a1abf762
2024-05-28 15:46:53 +00:00
Andrew Poelstra b31ac0fcb7
Merge rust-bitcoin/rust-bitcoin#2768: Deprecate `to_vec` in favour of `to_bytes`
eda61ddfef Deprecate to_vec in favour of to_bytes (Tobin C. Harding)

Pull request description:

  Currently we have to method names for the same thing "copy this object into a vector". The library is easier to use if we are uniform and just use one.

  Elect to use `to_bytes`, for context see discussion in PR #2585.

ACKs for top commit:
  apoelstra:
    ACK eda61ddfef Nice. IMO we should start deprecating stuff for two releases rather than one, so that people have a year to update.

Tree-SHA512: 0aadd1258a07bfa53806f19a3c41af8d3b1132aa42e7a2015a59c58c4309d7a9b50b86d076c181ce5870ba5acd989feec32669352ecf857ae6fd982873482c34
2024-05-28 15:19:35 +00:00
Andrew Poelstra 6e407e44e4
Merge rust-bitcoin/rust-bitcoin#2809: doc: fix "lazy line continuations" in markdown
1282b7f34b examples: drop a couple allocations (Andrew Poelstra)
45e0241267 doc: fix "lazy line continuations" in markdown (Andrew Poelstra)

Pull request description:

  Rust nightly as of 2024-05-27 has a new lint which detects list items which are continued by a non-indented line. Markdown treats these as single list items, which they sometimes are, but sometimes we intended them to be on a separate line.

  Also changes the docs for `UntweakedKeypair::tap_tweak` because the existing ones were overly technical and out-of-date.

  Also fixes a minor "no need to create a vec then dereference it" lint in the examples.

ACKs for top commit:
  storopoli:
    ACK 1282b7f34b
  tcharding:
    ACK 1282b7f34b

Tree-SHA512: 989c83b6bbbfbf8ddd2ade63b5f590f76810f4ec56fab432b580a40e3cc1468a0ea657dcc7ad0d4a31d49eb1390219616fec5a76b5680d5fddc3a06d81db30d7
2024-05-28 13:34:58 +00:00
Divyansh Gupta d6ef16af30 update api 2024-05-28 15:36:17 +05:30
Divyansh Gupta a336ec0dda refactor(script): move `read_scriptint` to `PushBytes` & create `read_int` function
* Moved read_scriptint method to Push_Bytes struct
 * Created Instruction::read_int method
fix #1547
2024-05-28 15:36:17 +05:30
Andrew Poelstra 1741229526
Merge rust-bitcoin/rust-bitcoin#2808: Add an `AddressData` type
b5ef7db3c0 api: Run just check-api (Tobin C. Harding)
1b40550ce8 Add an AddressData type (Tobin C. Harding)

Pull request description:

  In the 0.32.0 release we removed the `address::Payload` struct because it was deemed an implementation detail. As a byproduct of doing so we made it impossible for users to match on an enum and get the address payload (or data).

  - Add a public `AddressData` enum that holds an address' encoded data.
  - Add a conversion function to `Address` that returns the data enum.

  This patch is additive and is expected to be backported and release as a `0.32` point release.

ACKs for top commit:
  apoelstra:
    ACK b5ef7db3c0 I still feel a little partial to calling the struct "DecodedAddress" and the method "decode"...but this is good, and I do not want to bikeshed

Tree-SHA512: d97836bb2d7fc0f6e9fbba2afb30eeefefc88e7105d4765a146dd444c8397dd4d1ef4fd3e3eb925589294d46bfc8a66d33797a05dbc2131923534364424c135c
2024-05-27 16:29:06 +00:00
Andrew Poelstra 1282b7f34b
examples: drop a couple allocations
Detected by clippy.
2024-05-27 12:54:22 +00:00
Andrew Poelstra 45e0241267
doc: fix "lazy line continuations" in markdown
Rust nightly as of 2024-05-27 has a new lint which detects list items
which are continued by a non-indented line. Markdown treats these as
single list items, which they sometimes are, but sometimes we intended
them to be on a separate line.

Also changes the docs for `UntweakedKeypair::tap_tweak` because the
existing ones were overly technical and out-of-date.
2024-05-27 12:50:26 +00:00
Tobin C. Harding b5ef7db3c0
api: Run just check-api 2024-05-27 14:50:55 +10:00