Trait miniscript::psbt::PsbtOutputExt
source · pub trait PsbtOutputExt {
// Required method
fn update_with_descriptor_unchecked(
&mut self,
descriptor: &Descriptor<DefiniteDescriptorKey>
) -> Result<Descriptor<PublicKey>, ConversionError>;
}
Expand description
Extension trait for PSBT outputs
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 of a PSBT output populate the relevant metadata
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 this method doesn’t check that the script_pubkey
of the output being
updated matches the descriptor. To do that see update_output_with_descriptor
.
Return value
For convenience, this returns the concrete descriptor that is computed internally to fill
out the PSBT output fields. This can be used to manually check that the script_pubkey
is
consistent with the descriptor.