This is a transaction building library based on rust-miniscript
that lets you build, update, and finalize PSBTs with minimal dependencies.
Because the project builds upon miniscript we support descriptors natively.
Refer to BIP174, BIP370, and BIP371 to learn more about partially signed bitcoin transactions (PSBT).
To get started see the DataProvider
trait and the methods for adding inputs and outputs.
use bdk_tx::Builder;
use bdk_tx::DataProvider;
impl DataProvider for MyType { ... }
let mut builder = Builder::new();
builder.add_input(plan_utxo);
builder.add_output(script_pubkey, amount);
let (mut psbt, finalizer) = builder.build_tx(data_provider)?;
// Your PSBT signing flow...
let result = finalizer.finalize(&mut psbt)?;
assert!(result.is_finalized());
Found a bug, have an issue or a feature request? Feel free to open an issue on GitHub. This library is open source licensed under MIT.