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

Support addr() descriptors #759

Open
Tracked by #78
andrewtoth opened this issue Sep 21, 2022 · 6 comments
Open
Tracked by #78

Support addr() descriptors #759

andrewtoth opened this issue Sep 21, 2022 · 6 comments
Labels
documentation Improvements or additions to documentation module-wallet

Comments

@andrewtoth
Copy link

Is there a reason that addr() descriptors aren't supported, so we can do DescriptorPublicKey::from_str("addr(...)")?

@afilini
Copy link
Member

afilini commented Sep 22, 2022

They are not supported by miniscript, which is the library we use for handling our descriptors. I think the reason is that most of the things that miniscript provides (like estimating the witness size, constructing the witness, etc) wouldn't work without knowing the full script, so they just didn't implement them.

Once we complete #485 we should be able to "emulate" them inside bdk, but for the time being we depend on miniscript to add support for them.

@hisenb3rg
Copy link

Any updates on support addr() descriptors?
Is there any alternative for watch-only wallets using one or few addresses?

@LLFourn
Copy link
Contributor

LLFourn commented Sep 13, 2023

@jurglic what are you trying to build? There are plenty of ways to use bdk 1.0.0-alpha.* without using descriptors at all (miniscript is an optional dependency of bdk_chain).

@hisenb3rg
Copy link

@jurglic what are you trying to build? There are plenty of ways to use bdk 1.0.0-alpha.* without using descriptors at all (miniscript is an optional dependency of bdk_chain).

Hi, I'm trying to create a balance watcher for a couple of addresses and/or xpubs. I was thinking of using Wallet interface which I believe is always descriptor-based. Is there a better way without using Wallet?

@notmandatory
Copy link
Member

I tagged this as a documentation issue since I think we only need a better explanation/example of how to track individual and descriptor derived addresses (aka spks).

@notmandatory notmandatory added the documentation Improvements or additions to documentation label Nov 13, 2023
@LLFourn
Copy link
Contributor

LLFourn commented Nov 16, 2023

@jurglic what are you trying to build? There are plenty of ways to use bdk 1.0.0-alpha.* without using descriptors at all (miniscript is an optional dependency of bdk_chain).

Hi, I'm trying to create a balance watcher for a couple of addresses and/or xpubs. I was thinking of using Wallet interface which I believe is always descriptor-based. Is there a better way without using Wallet?

Sorry for the late reply. Yes use SpkTxOutIndex. Insert the spks you care about and then scan transactions. It will find any associated outputs.

You could also put that SpkTxOutIndex into an IndexedTxGraph which will let you do stuff like find utxos in transactions you insert into the graph (you'll also need a ChainOracle to tell you what's in the actual blockchain

@notmandatory notmandatory removed this from the 1.1.0 milestone Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation module-wallet
Projects
Status: No status
Development

No branches or pull requests

6 participants