Skip to content

Commit

Permalink
docs: update docs to point to derivation_of_spk
Browse files Browse the repository at this point in the history
updated docs to point `derivation_of_spk` function to find whether a `KeychainKind` exits  for the
given `script`

fix bitcoindevkit#1042
  • Loading branch information
15IITian committed Feb 25, 2024
1 parent fc83b2e commit 8e72fa7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/bdk/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,8 @@ impl<D> Wallet<D> {
}

/// Return whether or not a `script` is part of this wallet (either internal or external)
/// Use `derivation_of_spk` function to find the `KeychainKind` for the `script`, or
/// None if there's no associated `Keychain`.
pub fn is_mine(&self, script: &Script) -> bool {
self.indexed_graph.index.index_of_spk(script).is_some()
}
Expand Down

0 comments on commit 8e72fa7

Please sign in to comment.