Support addr() descriptors
Is there a reason that addr() descriptors aren't supported, so we can do DescriptorPublicKey::from_str("addr(...)")?
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.
Any updates on support addr() descriptors? Is there any alternative for watch-only wallets using one or few addresses?
@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).
@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?
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).
@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
Walletinterface which I believe is always descriptor-based. Is there a better way without usingWallet?
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