rust-bitcoin-unsafe-fast/bitcoin
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
..
contrib Remove rust-ordered dependency 2025-02-18 13:36:07 +11:00
embedded chore: remove unused cortex-m dependency from embedded Cargo.toml files in bitcoin and hashes modules. 2025-04-05 18:25:41 +08:00
examples Make script to/from hex use consensus encoding 2025-04-28 13:39:44 +10:00
src Make script to/from hex use consensus encoding 2025-04-28 13:39:44 +10:00
tests Make script to/from hex use consensus encoding 2025-04-28 13:39:44 +10:00
CHANGELOG.md Merge rust-bitcoin/rust-bitcoin#4292: chore: fix grammatical errors 2025-03-30 15:19:49 +00:00
Cargo.toml bitcoin: Add a script encoding example 2025-04-28 13:38:12 +10:00