Skip to content
Merged
Changes from all commits
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
9 changes: 9 additions & 0 deletions bdk-ffi/src/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,15 @@ impl Wallet {
.tx_details(txid.0)
.map(|details| details.into())
}

/// Returns the descriptor used to create addresses for a particular `keychain`.
///
/// It's the "public" version of the wallet's descriptor, meaning a new descriptor that has
/// the same structure but with the all secret keys replaced by their corresponding public key.
/// This can be used to build a watch-only version of a wallet.
pub fn public_descriptor(&self, keychain: KeychainKind) -> String {
self.get_wallet().public_descriptor(keychain).to_string()
}
}

impl Wallet {
Expand Down
Loading