Skip to content

Commit

Permalink
Import finalizer logic from miniscript
Browse files Browse the repository at this point in the history
Import the `psbt` module from `rust-miniscript` while tip of master was:

  a280447 Merge rust-bitcoin/rust-miniscript#617: Improve `TapTree` API

Only do changes required to get things building, however this includes
upgrade of the bitcoin dependency.

Feature gate the miniscript stuff because we want this crate to be a
drop in replacement for the `psbt` module in `rust-bitcoin`, users may
not want to have `rust-miniscript` in there dependency tree.
  • Loading branch information
tcharding committed Nov 15, 2023
1 parent c2d6201 commit 3586c75
Show file tree
Hide file tree
Showing 5 changed files with 2,211 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ no-std = ["bitcoin/no-std", "core2"]
serde = ["actual-serde", "bitcoin/serde"]
base64 = ["bitcoin/base64"]

# TODO: There is curently no way to turn on miniscript/serde and base64
miniscript-std = ["std", "miniscript/std"]
miniscript-no-std = ["no-std", "miniscript/no-std"]

[dependencies]
bitcoin = { version = "0.31.0", default-features = false, features = [] }

# Consider using "miniscript-std" or "miniscript-no-std"
miniscript = { version = "10.0.0", default-features = false, optional = true }
# Do NOT use this as a feature! Use the `serde` feature instead.
actual-serde = { package = "serde", version = "1.0.103", default-features = false, features = [ "derive", "alloc" ], optional = true }
# There is no reason to use this dependency directly, it is activated by the "no-std" feature.
Expand All @@ -35,3 +41,7 @@ serde_json = "1.0.0"
serde_test = "1.0.19"
serde_derive = "1.0.103"
bincode = "1.3.1"
secp256k1 = { version = "0.28", features = ["rand-std", "global-context"] }

[patch.crates-io.miniscript]
path = "../../rust-miniscript/dev-psbt"
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ extern crate actual_serde as serde;
/// Re-export of the `rust-bitcoin` crate.
pub extern crate bitcoin;

/// Re-export of the `rust-bitcoin` crate.
#[cfg(feature = "miniscript")]
pub extern crate miniscript;

mod error;
#[macro_use]
mod macros;
Expand Down
Loading

0 comments on commit 3586c75

Please sign in to comment.