Open pipermerriam opened 6 years ago
Probably not a blocker but: #24 is likely related to this in some way since both leverage HD wallets in some form.
Some work merged in a local feature branch in #34 pending in-depth review and security audit.
Alternate implementation from the shadowlands guy
https://github.com/kayagoban/shadowlands-core/blob/master/shadowlands/credstick/ledger_ethdriver.py
@pipermerriam has anyone attempted any progress in this direction?
digging into this a bit
this referenced code moved from https://github.com/kayagoban/shadowlands-core/blob/master/shadowlands/credstick/ledger_ethdriver.py to https://github.com/kayagoban/shadowlands/blob/master/shadowlands/credstick/ledger_ethdriver.py
this gist needs rebase https://gist.github.com/bargst/5f896e4a5984593d43f1b4eb66f79d68
there is a PR #34 mentions https://github.com/mikeshultz/ledger-eth-lib
made some progress on python with ledger using #34 branch
https://gist.github.com/benjyz/c4d96eb79a46c7d3d34d64f4870e2f8d
managed to get the version number and address from the device. have to read up on derivation paths. for some reason ledger live uses different paths
the code uses: ETH_DERIVATION_PATH_PREFIX = "m/44'/60'/0'/" ledger live uses ETH_DERIVATION_PATH_PREFIX = "44'/60'/1'/0/0"
should be this
ETH_DERIVATION_PATH = "m/44'/60'/0'/0/0"
maybe add a flag like this https://github.com/ethereum/eth-account/blob/master/eth_account/account.py#L79
What is wrong
Hardware wallets are great!
How can they be implemented.
https://gist.github.com/bargst/5f896e4a5984593d43f1b4eb66f79d68
This appears to be a great starting point.
The base
Account
object should probably assume the default path. We should probably also expose an API for accessing sub-accounts at a different path assuming the ledger supports arbitrary BIP32 paths.