Skip to content
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

Add WalletExt to extend Wallet for ease-of-use #83

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

rustaceanrob
Copy link
Collaborator

No description provided.

@rustaceanrob rustaceanrob force-pushed the wallet-ext-12-12 branch 2 times, most recently from a703c49 to 3b72535 Compare December 13, 2024 04:15
@rustaceanrob rustaceanrob changed the title Add RelevantScripts to extend Wallet for ease-of-use Add WalletExt to extend Wallet for ease-of-use Dec 13, 2024
@rustaceanrob rustaceanrob force-pushed the wallet-ext-12-12 branch 3 times, most recently from 7cd165d to f2c50c6 Compare December 14, 2024 18:27
Copy link
Collaborator

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

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

ACK 92ec239


#[cfg(feature = "wallet")]
impl WalletExt for bdk_wallet::Wallet {
fn peek_revealed_plus_lookahead(&self) -> Box<dyn Iterator<Item = ScriptBuf>> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I was wondering from an API perspective if this would make sense if implemented in bdk_wallet with a more abstract name, something like all_spks or just an iterator of all the derived addresses the wallet knows about including unrevealed. Then again, our peeking at the lookahead is somewhat off-label from the regular address API so probably better to leave it an extension trait.

@rustaceanrob rustaceanrob merged commit 71fc288 into bitcoindevkit:master Dec 17, 2024
2 checks passed
@rustaceanrob rustaceanrob deleted the wallet-ext-12-12 branch December 17, 2024 00:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants