-
Notifications
You must be signed in to change notification settings - Fork 0
feat: adopt Bitcoin HWI to work with Dash Core #1
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -155,7 +155,8 @@ def get_parser() -> HWIArgumentParser: | |||||||||||||
| enumerate_parser.set_defaults(func=enumerate_handler) | ||||||||||||||
|
|
||||||||||||||
| getmasterxpub_parser = subparsers.add_parser('getmasterxpub', help='Get the extended public key for BIP 44 standard derivation paths. Convenience function to get xpubs given the address type, account, and chain type.') | ||||||||||||||
| getmasterxpub_parser.add_argument("--addr-type", help="Get the master xpub used to derive addresses for this address type", type=AddressType.argparse, choices=list(AddressType), default=AddressType.WIT) # type: ignore | ||||||||||||||
| # [DASHIFIED] default address type is changed to legacy | ||||||||||||||
| getmasterxpub_parser.add_argument("--addr-type", help="Get the master xpub used to derive addresses for this address type", type=AddressType.argparse, choices=list(AddressType), default=AddressType.LEGACY) # type: ignore | ||||||||||||||
| getmasterxpub_parser.add_argument("--account", help="The account number", type=int, default=0) | ||||||||||||||
| getmasterxpub_parser.set_defaults(func=getmasterxpub_handler) | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -178,7 +179,8 @@ def get_parser() -> HWIArgumentParser: | |||||||||||||
| kparg_group.add_argument('--nokeypool', action='store_false', dest='keypool', help='Indicates that the keys are not to be imported to the keypool', default=False) | ||||||||||||||
| getkeypool_parser.add_argument('--internal', action='store_true', help='Indicates that the keys are change keys') | ||||||||||||||
| kp_type_group = getkeypool_parser.add_mutually_exclusive_group() | ||||||||||||||
| kp_type_group.add_argument("--addr-type", help="The address type (and default derivation path) to produce descriptors for", type=AddressType.argparse, choices=list(AddressType), default=AddressType.WIT) # type: ignore | ||||||||||||||
| # [DASHIFIED] default address type is changed to legacy | ||||||||||||||
| kp_type_group.add_argument("--addr-type", help="The address type (and default derivation path) to produce descriptors for", type=AddressType.argparse, choices=list(AddressType), default=AddressType.LEGACY) # type: ignore | ||||||||||||||
| kp_type_group.add_argument('--all', action='store_true', help='Generate addresses for all standard address types (default paths: ``m/{44,49,84}h/0h/0h/[0,1]/*)``') | ||||||||||||||
|
Comment on lines
+182
to
184
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update help text to reflect legacy-only support. The default address type is correctly changed to LEGACY, but the help text on Line 184 still references paths Apply this diff to update the help text: - kp_type_group.add_argument('--all', action='store_true', help='Generate addresses for all standard address types (default paths: ``m/{44,49,84}h/0h/0h/[0,1]/*)``')
+ kp_type_group.add_argument('--all', action='store_true', help='Generate addresses for all standard address types (default path: ``m/44h/5h/0h/[0,1]/*`` for Dash mainnet)')📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
| getkeypool_parser.add_argument('--account', help='BIP43 account', type=int, default=0) | ||||||||||||||
| getkeypool_parser.add_argument('--path', help='Derivation path, default follows BIP43 convention, e.g. ``m/84h/0h/0h/1/*`` with --addr-type wpkh --internal. If this argument and --internal is not given, both internal and external keypools will be returned.') | ||||||||||||||
|
|
@@ -194,7 +196,8 @@ def get_parser() -> HWIArgumentParser: | |||||||||||||
| group = displayaddr_parser.add_mutually_exclusive_group(required=True) | ||||||||||||||
| group.add_argument('--desc', help='Output Descriptor. E.g. wpkh([00000000/84h/0h/0h]xpub.../0/0), where 00000000 must match --fingerprint and xpub can be obtained with getxpub. See doc/descriptors.md in Bitcoin Core') | ||||||||||||||
| group.add_argument('--path', help='The BIP 32 derivation path of the key embedded in the address, default follows BIP43 convention, e.g. ``m/84h/0h/0h/1/*``') | ||||||||||||||
| displayaddr_parser.add_argument("--addr-type", help="The address type to display", type=AddressType.argparse, choices=list(AddressType), default=AddressType.WIT) # type: ignore | ||||||||||||||
| # [DASHIFIED] default address type is changed to legacy | ||||||||||||||
| displayaddr_parser.add_argument("--addr-type", help="The address type to display", type=AddressType.argparse, choices=list(AddressType), default=AddressType.LEGACY) # type: ignore | ||||||||||||||
| displayaddr_parser.set_defaults(func=displayaddress_handler) | ||||||||||||||
|
|
||||||||||||||
| setupdev_parser = subparsers.add_parser('setup', help='Setup a device. Passphrase protection uses the password given by -p. Requires interactive mode') | ||||||||||||||
|
|
||||||||||||||
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.
🧩 Analysis chain
🏁 Script executed:
# Check git remote to understand repository ownership git remote -vRepository: dashpay/HWI
Length of output: 166
🏁 Script executed:
Repository: dashpay/HWI
Length of output: 166
🏁 Script executed:
# Check the full README.md to understand context head -20 README.mdRepository: dashpay/HWI
Length of output: 166
🏁 Script executed:
Repository: dashpay/HWI
Length of output: 166
Update CI/CD badge URLs to point to the Dash fork.
The badges currently reference
github/bitcoin-core/HWIbut should referencegithub/dashpay/HWIto match this repository and the updated title "Dash Hardware Wallet Interface".🤖 Prompt for AI Agents