-
Notifications
You must be signed in to change notification settings - Fork 76
Adding descriptor generator #180
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
base: master
Are you sure you want to change the base?
Conversation
09b4f4a
to
ebf6be3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work Amos.
Most of the fns in utils
should be in the handlers
file, while most of those in handlers
should be placed in the utils
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your work on this, @AmosOO7.
If possible, please revert the imports you removed, as this will help in tracking your imports. Also, kindly remove any unnecessary comments and squash your commits into logical groupings. I have also left comments on other specific areas for your review.
Thank you!
6bff257
to
31f256a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for continuing to work on this.
I have left a couple of comments.
This enhancement introduces a new `descriptor` subcommand to `bdk-cli`, allowing users to generate wallet descriptors from either extended private keys (xprv), or fresh BIP39 mnemonics. It supports standard script types (BIP44, BIP49, BIP84, BIP86) and outputs both public and private descriptors for external and internal branches. The design improves developer and user experience by enabling easier wallet creation and script descriptor introspection. Closes bitcoindevkit#175
15495c4
to
6c8e714
Compare
- Ensure you can generate different type of descriptor with mnemonic - Changed the Json output format - Added path subcommand for generating descriptors from keys - Set multipath to accept different types for descriptors - Set multipath default value to false and gave it a short of m - Set type default to 84 and gave it a short to t
Pull Request Test Coverage Report for Build 15804707728Details
💛 - Coveralls |
Description
This PR introduces a new
descriptor
subcommand to the BDK CLI that enables users to generate Bitcoin wallet descriptors for internal and external paths, supporting common BIP standards (44, 49, 84, 86). It includes support for both single-path and multipath descriptors from extended keys (xprv
/xpub
ortprv
/tpub
).This resolves issue #175
Features Implemented
descriptor
subcommand to the CLI--multipath
for wildcard derivation paths--path
(e.g.,m/84h/1h/0h
) for non-multipath descriptors--type
defaults to84
and a shortt
--network
defaulttestnet
--multipath
defaults tofalse
and a shortm
Usage Examples
1. Generate a New Key (Mnemonic)
2. Generate Descriptors from an Extended Private Key
3. Generate Descriptors from a Mnemonic (no key provided)
4. Generate Multipath Descriptors from an Extended Public Key or Private Key
5. Generate Descriptors from XPRV with a Custom Derivation Path
cargo fmt
andcargo clippy
before committingNew Features:
CHANGELOG.md