logo
pub struct SignOptions {
    pub trust_witness_utxo: bool,
    pub assume_height: Option<u32>,
    pub allow_all_sighashes: 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.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.