eth-account
eth-account copied to clipboard
wip: introduce py-hdwallet
What does it do?
Introduces py-hdwallet for child key derivation.
(WIP: seeking feedback on items below)
Background
- My understanding of the plan is for py-hdwallet to eventually provide all BIP32-related functionality within eth-account. This introduction of the library only goes as far as replicating existing functionality recently introduced by @fubuloubu.
- Mnemonics are currently outside of the scope of py-hdwallet, so @fubuloubu's recent mnemonic work would go untouched.
TODO:
- [ ] put all testing in its right place, e.g., remove or alter relevant tests in eth-account; some tests are better suited for py-hdwallet.
- [ ] agree on hardening representation (e.g.,
'
,h
,H
, etc.)- py-hdwallet only supports
h
- the eth-account implementation had support for
'
andH
- py-hdwallet only supports
Cute Animal Picture
The '
is the standard representation IIRC. It should be supported prior to either of the other ones. Understanding it's not exactly the most legible in code, but a simple replace would solve that.
Also, a nice thing that should be introduced at some point is an alternative account type that can continuously derive new accounts using hdwallet, and encrypts/decrypts the master key instead of the account key. This would come in handy primarily for testing use (deriving multiple test accounts from a seed), but would set the stage for hardware wallet integration (which uses hd paths to obtain the account from master public key).