pub trait PsbtInputExt {
// Required method
fn update_with_descriptor_unchecked(
&mut self,
descriptor: &Descriptor<DefiniteDescriptorKey>,
) -> Result<Descriptor<PublicKey>, ConversionError>;
}Expand description
Extension trait for PSBT inputs
Required Methods§
Sourcefn update_with_descriptor_unchecked(
&mut self,
descriptor: &Descriptor<DefiniteDescriptorKey>,
) -> Result<Descriptor<PublicKey>, ConversionError>
fn update_with_descriptor_unchecked( &mut self, descriptor: &Descriptor<DefiniteDescriptorKey>, ) -> Result<Descriptor<PublicKey>, ConversionError>
Given the descriptor for a utxo being spent populate the PSBT input’s fields so it can be signed.
If the descriptor contains wildcards or otherwise cannot be transformed into a concrete
descriptor an error will be returned. The descriptor can (and should) have extended keys in
it so PSBT fields like bip32_derivation and tap_key_origins can be populated.
Note that his method doesn’t check that the witness_utxo or non_witness_utxo is
consistent with the descriptor. To do that see update_input_with_descriptor.
§Return value
For convenience, this returns the concrete descriptor that is computed internally to fill
out the PSBT input fields. This can be used to manually check that the script_pubkey in
witness_utxo and/or non_witness_utxo is consistent with the descriptor.