Skip to content

Commit

Permalink
Merge #753: Improve docs regarding PSBT finalization
Browse files Browse the repository at this point in the history
8963e8c Improve docs w.r.t. PSBT finalization (Elias Rohrer)

Pull request description:

  ### Description

  This PR includes just a few tiny changes to the docs trying to make it a bit more clear what PSBT finalization is and what to expect.

  ### Notes to the reviewers

  ### Changelog notice

  ### Checklists

  #### All Submissions:

  * [x] I've signed all my commits
  * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md)
  * [x] I ran `cargo fmt` and `cargo clippy` before committing

ACKs for top commit:
  afilini:
    ACK 8963e8c

Tree-SHA512: ea1a6c715c2832cdf3a428654fb8fad08a0549e46a808ca7a424590145fc2c40164ea08eb636ce5cd648dd6335480accd1d91f9e37e9397feaf0dac2015e8baa
  • Loading branch information
afilini committed Sep 15, 2022
2 parents 562cb81 + 8963e8c commit dfeb08f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions src/wallet/signer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dfeb08f

Please sign in to comment.