pub struct SignOptions {
pub trust_witness_utxo: bool,
pub assume_height: Option<u32>,
pub allow_all_sighashes: bool,
pub try_finalize: bool,
pub sign_with_tap_internal_key: bool,
pub allow_grinding: 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: boolWhether 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 could 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: boolWhether 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.
try_finalize: boolWhether to try finalizing the PSBT after the inputs are signed.
Defaults to true which will try finalizing PSBT after inputs are signed.
sign_with_tap_internal_key: boolWhether 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.
allow_grinding: boolWhether we should grind ECDSA signature to ensure signing with low r
or not.
Defaults to true, i.e., we always grind ECDSA signature to sign with low r.
Trait Implementations§
Source§impl<UT> ConvertError<UT> for SignOptions
impl<UT> ConvertError<UT> for SignOptions
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl<UT> FfiConverter<UT> for SignOptions
impl<UT> FfiConverter<UT> for SignOptions
Source§const TYPE_ID_META: MetadataBuffer
const TYPE_ID_META: MetadataBuffer
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<SignOptions> for SignOptions
impl From<SignOptions> for SignOptions
Source§fn from(options: SignOptions) -> BdkSignOptions
fn from(options: SignOptions) -> BdkSignOptions
Source§impl<UT> Lift<UT> for SignOptions
impl<UT> Lift<UT> for SignOptions
Source§impl<UT> LiftRef<UT> for SignOptions
impl<UT> LiftRef<UT> for SignOptions
type LiftType = SignOptions
Source§impl<UT> LiftReturn<UT> for SignOptions
impl<UT> LiftReturn<UT> for SignOptions
Source§type ReturnType = <SignOptions as Lift<UT>>::FfiType
type ReturnType = <SignOptions as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for SignOptions
impl<UT> Lower<UT> for SignOptions
Source§impl<UT> LowerError<UT> for SignOptions
impl<UT> LowerError<UT> for SignOptions
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for SignOptions
impl<UT> LowerReturn<UT> for SignOptions
Source§type ReturnType = <SignOptions as Lower<UT>>::FfiType
type ReturnType = <SignOptions as Lower<UT>>::FfiType
Source§fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
fn lower_return(v: Self) -> Result<Self::ReturnType, RustCallError>
§fn handle_failed_lift(
error: LiftArgsError,
) -> Result<Self::ReturnType, RustCallError>
fn handle_failed_lift( error: LiftArgsError, ) -> Result<Self::ReturnType, RustCallError>
Source§impl<UT> TypeId<UT> for SignOptions
impl<UT> TypeId<UT> for SignOptions
const TYPE_ID_META: MetadataBuffer
Auto Trait Implementations§
impl Freeze for SignOptions
impl RefUnwindSafe for SignOptions
impl Send for SignOptions
impl Sync for SignOptions
impl Unpin for SignOptions
impl UnwindSafe for SignOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Arc<> Read more