-
-
Notifications
You must be signed in to change notification settings - Fork 50
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 typed methods via inheritance #12
Conversation
Requires this PR to eth-simple-keyring be merged and published, and added to this PR's dependencies. |
I wanted to use my new signature output examples, but since this is an hd-wallet, there was no easy way for me to import those keys for reuse. Since it's inheriting those implementations, it seems less critical to test the behavior, and sufficient to test that its signatures can be recovered. |
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "eth-hd-keyring", | |||
"version": "2.1.0", | |||
"version": "3.0.0", |
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.
It looks like this needs to be updated to 3.1.0
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.
Or maybe package.json
should be changed to 3.0.0
? Not sure why it'd be 3.1.0
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.
Mostly to lock-step with simple-keyring: 3.x was adding app keys, and 3.1 is adding type defs.
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.
There may have been a misunderstanding here - the lockfile is still out of sync with the manifest, so it'll be dirty whenever you install. This version should always match the manifest version.
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.
Oh! I'm sorry, I did misunderstand. fix in PR.
Published as |
Now uses inheritance to reuse method implementations from eth-simple-keyring, by merely exposing a
getPrivateKeyFor(address)
method.Adds methods for all the types of
signTypedData
methods, with tests included, and confirms those signed results can be recovered with the latest eth-sig-util.Includes the same breaking change as eth-simple-keyring has, because
signTypedData
now directs to the_v1
method instead of_v3
, to match the MetaMask provider API.