andelf / tronpy

TRON Python Client Library.
MIT License
204 stars 96 forks source link

added hd account feature as implemented in web3 #84

Closed Ephraim-Akolo closed 1 year ago

Ephraim-Akolo commented 1 year ago

Added the hierarchical-deterministic (HD) wallet feature as implemented in the python package web3. some source code template were gotten from https://github.com/trezor/python-mnemonic and https://github.com/ethereum/web3.py and modified to integrate without additional dependencies.

MrNaif2018 commented 1 year ago

Hi! Thank you for your PR.

I don't think that vendoring mnemonic package makes sense. What about making it an optional dependency instead?

Ephraim-Akolo commented 1 year ago

okay, do you mean i should create a new git repo for it and add it as an extra_require in the setup?

MrNaif2018 commented 1 year ago

Why a new git repo, if it's accessible as mnemonic package on PyPI? We can just add it in extra_require and make code work conditionally based on presence of such library

Ephraim-Akolo commented 1 year ago

The package is not accessible from PyPi because i built it as part of the tronpy package. Unless you want me to build it separately as a standalone package that can then be pushed to PyPi independently.

Ephraim-Akolo commented 1 year ago

Only the packages currently present are used to implement the code. There are no additional imports.

MrNaif2018 commented 1 year ago

tronpy/hdwallet/mnemonic.py and wordlist directory is from https://github.com/trezor/python-mnemonic which can be installed from PyPI as pip install mnemonic So you can change imports to using it instead of a vendored copy

Ephraim-Akolo commented 1 year ago

Alright, I will do that commit the change.