]> Untitled Git - bdk/commitdiff
Make psbt mod public and add required docs
authorSteve Myers <steve@notmandatory.org>
Tue, 18 Oct 2022 20:25:38 +0000 (15:25 -0500)
committerSteve Myers <steve@notmandatory.org>
Tue, 18 Oct 2022 20:26:12 +0000 (15:26 -0500)
src/lib.rs
src/psbt/mod.rs

index 65e35a72a6d10d64e47958df5aefa931017dcc55..56e8ea8d1fbb4afe8142db1b548afeda8d87929a 100644 (file)
@@ -263,7 +263,7 @@ pub mod descriptor;
 #[cfg(feature = "test-md-docs")]
 mod doctest;
 pub mod keys;
-pub(crate) mod psbt;
+pub mod psbt;
 pub(crate) mod types;
 pub mod wallet;
 
index f06b5297cbd5177c54964373ee3fe4dc6e5bae72..b6119a443a4cf89b03c58c6654fdb6c5b78f09b2 100644 (file)
@@ -9,11 +9,17 @@
 // You may not use this file except in accordance with one or both of these
 // licenses.
 
+//! Additional functions on the `rust-bitcoin` `PartiallySignedTransaction` structure.
+
 use crate::FeeRate;
 use bitcoin::util::psbt::PartiallySignedTransaction as Psbt;
 use bitcoin::TxOut;
 
+// TODO upstream the functions here to `rust-bitcoin`?
+
+/// Trait to add functions to extract utxos and calculate fees.
 pub trait PsbtUtils {
+    /// Get the `TxOut` for the specified input index, if it doesn't exist in the PSBT `None` is returned.
     fn get_utxo_for(&self, input_index: usize) -> Option<TxOut>;
 
     /// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats.