Skip to content

Miniscript based transaction builder used to create and update PSBTs

License

Notifications You must be signed in to change notification settings

bitcoindevkit/bdk-tx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bdk-tx

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).

Example

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());

Contributing

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.

About

Miniscript based transaction builder used to create and update PSBTs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages