Skip to content

Add PsbtInputExt::update_with_descriptor #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 30, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/descriptor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,9 +771,10 @@ impl Descriptor<DescriptorPublicKey> {
/// Utility method for deriving the descriptor at each index in a range to find one matching
/// `script_pubkey`.
///
/// If it finds a match then it returns the index it was derived it and the concrete descriptor
/// at that index. If the descriptor is non-derivable then it will simply check the script
/// pubkey against the descriptor (and in that case the index returned will be meaningless).
/// If it finds a match then it returns the index it was derived at and the concrete
/// descriptor at that index. If the descriptor is non-derivable then it will simply check the
/// script pubkey against the descriptor and return it if it matches (in this case the index
/// returned will be meaningless).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, TIL we derive at an index not from an index. Cheers.

pub fn find_derivation_index_for_spk<C: secp256k1::Verification>(
&self,
secp: &secp256k1::Secp256k1<C>,
Expand Down