pub struct SignOptions {
pub trust_witness_utxo: bool,
pub assume_height: Option<u32>,
pub allow_all_sighashes: bool,
pub remove_partial_sigs: bool,
pub try_finalize: bool,
pub tap_leaves_options: TapLeavesOptions,
pub sign_with_tap_internal_key: bool,
}
Expand description
Options for a software signer
Adjust the behavior of our software signers and the way a transaction is finalized
Fields
trust_witness_utxo: bool
Whether the signer should trust the witness_utxo
, if the non_witness_utxo
hasn’t been
provided
Defaults to false
to mitigate the “SegWit bug” which chould trick the wallet into
paying a fee larger than expected.
Some wallets, especially if relatively old, might not provide the non_witness_utxo
for
SegWit transactions in the PSBT they generate: in those cases setting this to true
should correctly produce a signature, at the expense of an increased trust in the creator
of the PSBT.
For more details see: https://blog.trezor.io/details-of-firmware-updates-for-trezor-one-version-1-9-1-and-trezor-model-t-version-2-3-1-1eba8f60f2dd
assume_height: Option<u32>
Whether the wallet should assume a specific height has been reached when trying to finalize a transaction
The wallet will only “use” a timelock to satisfy the spending policy of an input if the timelock height has already been reached. This option allows overriding the “current height” to let the wallet use timelocks in the future to spend a coin.
allow_all_sighashes: bool
Whether the signer should use the sighash_type
set in the PSBT when signing, no matter
what its value is
Defaults to false
which will only allow signing using SIGHASH_ALL
.
remove_partial_sigs: bool
Whether to remove partial_sigs from psbt inputs while finalizing psbt.
Defaults to true
which will remove partial_sigs after finalizing.
try_finalize: bool
Whether to try finalizing psbt input after the inputs are signed.
Defaults to true
which will try fianlizing psbt after inputs are signed.
tap_leaves_options: TapLeavesOptions
Specifies which Taproot script-spend leaves we should sign for. This option is ignored if we’re signing a non-taproot PSBT.
Defaults to All, i.e., the wallet will sign all the leaves it has a key for.
sign_with_tap_internal_key: bool
Whether we should try to sign a taproot transaction with the taproot internal key or not. This option is ignored if we’re signing a non-taproot PSBT.
Defaults to true
, i.e., we always try to sign with the taproot internal key.
Trait Implementations
sourceimpl Clone for SignOptions
impl Clone for SignOptions
sourcefn clone(&self) -> SignOptions
fn clone(&self) -> SignOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SignOptions
impl Debug for SignOptions
Auto Trait Implementations
impl RefUnwindSafe for SignOptions
impl Send for SignOptions
impl Sync for SignOptions
impl Unpin for SignOptions
impl UnwindSafe for SignOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more