Repository navigation
wallet: derivehdkey RPC to get xpub at arbitrary path #32784
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
dab525e
key: add DeriveExtKey() helper
Sjors fc53077
test: move parse_hd_keypath test to bip32_tests
Sjors 8cce969
Have ParseHDKeypath handle h derivation marker
Sjors ba78c31
fuzz: check ParseHDKeypath/WriteHDKeypath round-trip
Sjors e36c4b7
util: reject out-of-range BIP32 keypath indices
Sjors 0ab61ca
rpc: ParsePathBIP32 helper
Sjors 3821452
refactor: add hardened derivation helper
Sjors aaf1548
wallet: generalize GetActiveHDPubKeys helper
Sjors 62da9f9
wallet: add GetExtKey helper
Sjors d9570f0
rpc: add derivehdkey
Sjors 3662e33
test: use derivehdkey in M-of-N multisig demo
Sjors c3945bf
doc: use derivehdkey in multisig tutorial
Sjors File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| Wallet | ||
| ------ | ||
|
|
||
| - A new `derivehdkey` RPC is available to obtain an xpub or xprv for a | ||
| derivation path with at least one hardened step from an HD key known to the | ||
| wallet. This can be used to coordinate a multisig setup, where each signer | ||
| shares an xpub using a | ||
| different derivation path than the default single-signature descriptors. The | ||
| example in `doc/multisig-tutorial.md` is updated to use this RPC. (#32784) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
ParsePathBIP32()currently acceptsm/2147483648, which is0x80000000. Since BIP32 uses that high bit to mark hardened derivation, the RPC ends up treating this asm/0hinstead of rejecting it.Suggestion:
diff
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 catch! Fixed in f086c97ab56d04f48297cb0ec1029ff61f2ff772 (in
bip32.cpp)