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

Create new abstract base class for LocalAccount #28

Closed
carver opened this issue Jun 7, 2018 · 0 comments · Fixed by #29
Closed

Create new abstract base class for LocalAccount #28

carver opened this issue Jun 7, 2018 · 0 comments · Fixed by #29

Comments

@carver
Copy link
Contributor

carver commented Jun 7, 2018

With the incoming work on #25 (in PR #26) -- it's time to have an abstract class defining the interface for a LocalAccount, plus some docs about which methods must be implemented. Specifically:

  • address property is required
  • signHash() is required
  • signTransaction() is required
  • __hash__() and __eq__() are required - so care should be taken that the account cannot be mutated to use a different private key.
  • privateKey property is optional, since some sources refuse to reveal it (like a hardware wallet)
  • encrypt() is optional, since some accounts cannot reveal the private key

(Also, I just noticed that the docs for encrypt in LocalAccount are wrong. See the definition in Account instead

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 a pull request may close this issue.

1 participant