Comments (4)
bwt seems to use xpubs to represent a range of outputs (conceptually the same thing as a a ranged descriptor), and HD origin fingerprints as public identifiers for these output ranges. When trying to integrate descriptors, the problem is that HD fingerprints only map to a subset of ranged descriptors. Perhaps descriptor checksums could serve this same purpose for wallets anchored to a ranged descriptor instead of an xpub?
You are currently marking every exported address with a {origin}/{index}
label. You could switch this to {ranged_descriptor_checksum}/{ranged_descriptor_index}
.
You could call importmulti
with a (non-ranged) descriptor argument instead of the current address
argument. Just replace every *
in ranged descriptor with an index. Using a non-ranged descriptor allows you to bypass this issue. In light of #2, it's a potentially superior address import method because origin information contained inside the descriptor can be included in PSBTs generated with walletcreatefundedpsbt
(just set bip32derivs
to true
in walletcreatefundedpsbt
call).
I've only spent a few hours looking at bwt so I could be totally wrong, but it seems like this approach would be strictly more capable than the current xpub-based approach.
Note: @afilini has published Rust implementations of descriptor checksums and ranged descriptors which may be useful here.
from bwt.
Making the xpub/extkey a specialized case of descriptors and replacing the key fingerprint with a descriptor fingerprint is what I had in mind for supporting descriptors. The descriptors would be how things are implemented under the hood, with some conveniences for users that prefer to think in terms of xpub wallets.
(So users could specify an [xyz]pub and have it converted to a descriptor, and possibly also keep a map around for converting extkey_fingerprint -> descriptor_fingerprint to maintain compatibility with the current key-fingerprint-based endpoints, such that /hd/:fingerprint/:index
would still work but internally delegate to the matching descriptor.)
You could call
importmulti
with a (non-ranged) descriptor argument
You're right that using non-ranged descriptor imports with a label would give best of both worlds - bwt will have its label for quick access, and bitcoind will have its descriptor/origin information for PSBT.
I've only spent a few hours looking at bwt so I could be totally wrong, but it seems like this approach would be strictly more capable than the current xpub-based approach.
You're absolutely correct; I just didn't get around to that yet. :-)
Note: @afilini has published Rust implementations of descriptor checksums and ranged descriptors which may be useful here.
That's pretty useful, thanks for the links!
from bwt.
Descriptor-based tracking is nearly ready on the 202010-descriptor branch.
This is how the new API looks like: https://gist.github.com/shesek/bf357a55c968635d34adfd171d0c65b1
from bwt.
Merged to master! The bulk of the changes are in d305ec9, with a bunch of followup enhancement commits.
from bwt.
Related Issues (20)
- GPG key expired HOT 2
- document all RPC calls
- Cannot connect to server HOT 1
- Field keypoololdest returned from getwalletinfo should not be required
- rpc blockchain.relayfee peer panicked on 'Option::unwrap()' HOT 1
- https://github.com/btcpayserver/btcpayserver-docker HOT 1
- Compatibility with Bitcoin Core v0.21 HOT 1
- Multi-arch docker images
- Use testmempoolaccept to determine if the transaction is valid prior to custom broadcast
- Switch WebHooks to use ureq/attohttpc
- `error for getwalletinfo: RpcError { code: -32601, message: "Method not found", data: None }` HOT 1
- Feature Request: elements/liquid chains HOT 4
- code: -18, message: "No wallet is loaded" HOT 4
- Feature Request: Add tracked accounts at runtime HOT 2
- Optional ASCII-only console output HOT 3
- Add Taproot support HOT 10
- Support coinbase outputs HOT 2
- Connection via Bitcoin RPC fails in Bitcoin v23 rc2 HOT 7
- Fee field for getrawmempool has moved in Bitcoin v23 rc2
- Allow configuration of separate RPC socket connect timeout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bwt.