]> Untitled Git - bdk/commitdiff
Improve docs w.r.t. PSBT finalization
authorElias Rohrer <ero@tnull.de>
Thu, 15 Sep 2022 12:32:10 +0000 (14:32 +0200)
committerElias Rohrer <ero@tnull.de>
Thu, 15 Sep 2022 12:45:47 +0000 (14:45 +0200)
src/wallet/mod.rs
src/wallet/signer.rs

index 3490fdfc3add53f7440340560bcee43742978ef8..04c5a6508c167172fe5719c414719680b140e872 100644 (file)
@@ -1196,7 +1196,12 @@ where
         }
     }
 
-    /// Try to finalize a PSBT
+    /// Finalize a PSBT, i.e., for each input determine if sufficient data is available to pass
+    /// validation and construct the respective `scriptSig` or `scriptWitness`. Please refer to
+    /// [BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Input_Finalizer)
+    /// for further information.
+    ///
+    /// Returns `true` if the PSBT could be finalized, and `false` otherwise.
     ///
     /// The [`SignOptions`] can be used to tweak the behavior of the finalizer.
     pub fn finalize_psbt(
index 1704a9532f54488e680779ded19c9e44fa4d3bfd..1feb15d697287d17cd574e7a498b98d4c5826622 100644 (file)
@@ -696,14 +696,14 @@ pub struct SignOptions {
     /// Defaults to `false` which will only allow signing using `SIGHASH_ALL`.
     pub allow_all_sighashes: bool,
 
-    /// Whether to remove partial_sigs from psbt inputs while finalizing psbt.
+    /// Whether to remove partial signatures from the PSBT inputs while finalizing PSBT.
     ///
-    /// Defaults to `true` which will remove partial_sigs after finalizing.
+    /// Defaults to `true` which will remove partial signatures during finalization.
     pub remove_partial_sigs: bool,
 
-    /// Whether to try finalizing psbt input after the inputs are signed.
+    /// Whether to try finalizing the PSBT after the inputs are signed.
     ///
-    /// Defaults to `true` which will try fianlizing psbt after inputs are signed.
+    /// Defaults to `true` which will try finalizing PSBT after inputs are signed.
     pub try_finalize: bool,
 
     /// Specifies which Taproot script-spend leaves we should sign for. This option is