Skip to content

Commit 34987d5

Browse files
committed
Make psbt mod public and add required docs
1 parent 1c76084 commit 34987d5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ pub mod descriptor;
263263
#[cfg(feature = "test-md-docs")]
264264
mod doctest;
265265
pub mod keys;
266-
pub(crate) mod psbt;
266+
pub mod psbt;
267267
pub(crate) mod types;
268268
pub mod wallet;
269269

src/psbt/mod.rs

+6
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@
99
// You may not use this file except in accordance with one or both of these
1010
// licenses.
1111

12+
//! Additional functions on the `rust-bitcoin` `PartiallySignedTransaction` structure.
13+
1214
use crate::FeeRate;
1315
use bitcoin::util::psbt::PartiallySignedTransaction as Psbt;
1416
use bitcoin::TxOut;
1517

18+
// TODO upstream the functions here to `rust-bitcoin`?
19+
20+
/// Trait to add functions to extract utxos and calculate fees.
1621
pub trait PsbtUtils {
22+
/// Get the `TxOut` for the specified input index, if it doesn't exist in the PSBT `None` is returned.
1723
fn get_utxo_for(&self, input_index: usize) -> Option<TxOut>;
1824

1925
/// The total transaction fee amount, sum of input amounts minus sum of output amounts, in Sats.

0 commit comments

Comments
 (0)