-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
KeyfileAccount
should have a publicKey method
#1701
Comments
KeyfileAccount
should have a publickKey methodKeyfileAccount
should have a publicKey method
Yeah, this seems fine. Implementation suggestion would be to add this property to class KeyfileAccount(AccountAPI):
...
@property # NOTE: consider `cached_property`
def public_key(self) -> HexBytes:
... # logic you outlined above |
I am just perplexed that we have to decrypt an account's private key in order to obtain the public key... that just seems backwards? |
Not really, and address is a keccak hash so it is not able to be obtained like this, so you need to to run the key derivation to get the public key again But yes, you can obtain the public key during the address derivation process |
I have made some changes to cache the public key in the |
Overview
account.public_key
method to theKeyfileAccount
orAccountAPI
object.Specification
Approach
keyfile
property of theKeyfileAccount
object I would like to implement this feature.Dependencies
I believe both of them are already in use.
The text was updated successfully, but these errors were encountered: