Skip to content
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

feat: public_key method added to KeyfileAccount class [APE-1466] #1702

Merged
merged 3 commits into from
Oct 19, 2023
Merged

feat: public_key method added to KeyfileAccount class [APE-1466] #1702

merged 3 commits into from
Oct 19, 2023

Conversation

Aviksaikat
Copy link
Contributor

What I did

fixes: #1701

How I did it

How to verify it

from ape import accounts
a = accounts[0]
a.public_key
# Enter your password
>> HexBytes("0x33abababbababababbabababababababba..")

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@vany365 vany365 changed the title feat: public_key method added to KeyfileAccount class feat: public_key method added to KeyfileAccount class [APE-1466] Oct 18, 2023
@Aviksaikat Aviksaikat changed the title feat: public_key method added to KeyfileAccount class [APE-1466] feat: public_key method added to KeyfileAccount class [APE-1466] Oct 18, 2023
Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, but the public key should maybe just be in the JSON unencrypted so your passphrase isnt required to get the public key.

thoughts anyone?

src/ape_accounts/accounts.py Show resolved Hide resolved
…keyfile & no longer require password if already cached
@fubuloubu
Copy link
Member

looks good, but the public key should maybe just be in the JSON unencrypted so your passphrase isnt required to get the public key.

thoughts anyone?

can do that, the keyfile format just needs a minimum number of members to work, you can add more

@Aviksaikat
Copy link
Contributor Author

I have opened an issue in the eth_keys repo as well so that we can it can be a general property of the keyfile. But the repo seems to be very inactive.

Copy link
Member

@antazoey antazoey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This is the best we can do until eth-keyfile updates

@antazoey antazoey merged commit 9e50016 into ApeWorX:main Oct 19, 2023
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

KeyfileAccount should have a publicKey method
3 participants