-
Notifications
You must be signed in to change notification settings - Fork 20
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
add get_xpub_at_path function which can handle non-hardened derivations #24
Conversation
scgbckbone
commented
Jun 30, 2022
- copied from tapsigner branch in HWI as achow does not want to have this code in HWI
cktap/proto.py
Outdated
""" | ||
Sign 32 bytes digest and return 65 bytes long recoverable signature. | ||
|
||
Uses derivation path based on current set derivation on card plus optional | ||
subpath parameter which if provided, will be added to card derivation path. | ||
Subpath can only be of length 2 and non-hardened components only. | ||
if subpath is specified - use current derivation + derive subpath | ||
if bip32_path is specified - subpath is ignored and derivation goes from root |
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.
bip32_path => fullpath or subkey_path ... maybe rename subpath too
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.
renamed:
subpath --> sub_deriv
bip32_path --> fullpath
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.
renamed sub_deriv back to subpath --> so we do not "fork" other people code
1be1121
to
87881e9
Compare
I think you've changed the (type of) arguments for a few functions here. This makes me "feel bad" since we are breaking working code that others may have written already. Can't we accept both str and |
only breaking change is renaming of sign_digest works as before - if you do not provide fullpath or am I missing something (besides subpath -> subderiv)? If subpath/sub_deriv is reverted I do not see any breaking changes there... |
oh - forgot about changed parameters to set_derivation/get_derivation -> I can also revert that (or we can bump minor version -> 1.1.0) |
changed few things:
|
c92a193
to
527899c
Compare
…tions; sign_digest adjusted to handle fullpath(bip32)