Skip to content

Commit 2a40d6e

Browse files
committed
feat(psbt): Introduce PsbtParams
We add the `psbt::params` module along with new types including `PsbtParams`, `ReplaceParams`, and `SelectionStrategy`. `PsbtParams` is mostly inspired by `TxParams` from `tx_builder.rs`, except that we've removed support for `policy_path` in favor of `add_assets` API. Further enhancements include `.utxo_filter` and `.canonical_params` member fields. In `lib.rs` re-export everything under `psbt` module. - deps: Add `bdk_tx` 0.1.0 - deps: Add `bdk_coin_select` 0.4.1
1 parent 6a8a3d0 commit 2a40d6e

File tree

4 files changed

+579
-0
lines changed

4 files changed

+579
-0
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ rustdoc-args = ["--cfg", "docsrs"]
1818

1919
[dependencies]
2020
bdk_chain = { version = "0.23.1", features = ["miniscript", "serde"], default-features = false }
21+
bdk_coin_select = { version = "0.4.1" }
22+
bdk_tx = { version = "0.1.0" }
2123
bitcoin = { version = "0.32.7", features = ["serde", "base64"], default-features = false }
2224
miniscript = { version = "12.3.1", features = ["serde"], default-features = false }
2325
rand_core = { version = "0.6.0" }

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub use bdk_chain::rusqlite;
4545
pub use bdk_chain::rusqlite_impl;
4646
pub use descriptor::template;
4747
pub use descriptor::HdKeyPaths;
48+
pub use psbt::*;
4849
pub use signer;
4950
pub use signer::SignOptions;
5051
pub use tx_builder::*;

src/psbt/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ use bitcoin::FeeRate;
1717
use bitcoin::Psbt;
1818
use bitcoin::TxOut;
1919

20+
#[allow(unused)]
21+
mod params;
22+
23+
pub use params::*;
24+
2025
// TODO upstream the functions here to `rust-bitcoin`?
2126

2227
/// Trait to add functions to extract utxos and calculate fees.

0 commit comments

Comments
 (0)