Skip to content

Commit 4e2b891

Browse files
committed
use semver trick to replace most types with types from 0.26
In 0.26.0 we made two breaking changes: we changed the signature of some blinding functions in PartiallySignedTransaction, and we removed the & from a couple utility methods in pset::raw::ProprietaryKey and in TxOut. Therefore, those three types, and any type which refers to them in their public API, have semver-breaking changes. But no other type does! So we can re-export everything else in a minor release of 0.25.x. The types that we must preserve are: * PartiallySignedTransaction * TxOut * Transaction (contains Vec<TxOut> in a public field) * Block (contains Vec<Transaction> in a public field) There are then several modules which have impl blocks on these types, which we need to keep; and the PSET `Output` type has accessors for a `TxOut`, so we need to keep that, which means that we need to keep its whole `pset::Serialize` impl, which means we need to keep the whole private `Map` trait. Frustrating. Now, this commit is very large and may be hard to review. However, much of it is easy: * First, we entirely delete the `address`, `blech32`, `confidential`, `dynafed`, `encode`, `error`, `ext`, `fast_merkle_root`, `hash_types`, `hex`, `issuance`, `locktime`, `opcodes`, `parse`, `schnorr`, `script`, and `taproot` modules and replace them with re-exports. To confirm these changes are OK, you ought to check their API on crates.io (or by just grepping) and see that none of the types listed above appear there. * Then, the `block` and `transaction` modules have every type except for `TxOut`, `Transaction` and `Block` removed. So that's probably also easy to review, though again it's good to check that these types don't appear in the API of anything that was removed. * Then `blind.rs` and `pset/elip100.rs` have impls on `Transaction` and `PartiallySignedTransaction`, so they had to stay. * Then `sighash.rs` has some functions which are conditioned on T with T: Deref<Transaction> or Borrow<TxOut> so these had to be kept; we also had to keep the private method split_anyonecanpay_flag and move it to a standalone function. * Finally, the whole PSET module was kept, except that I removed the Serialize trait and a couple utility structs, including the errors, in a somewhat ad-hoc way. PROBABLY it's fine to just skim this and we'll release it and see if anything breaks.
1 parent 84fee08 commit 4e2b891

32 files changed

+81
-15361
lines changed

src/address.rs

Lines changed: 0 additions & 1019 deletions
This file was deleted.

src/blech32/decode.rs

Lines changed: 0 additions & 924 deletions
This file was deleted.

src/blech32/mod.rs

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)