Skip to content

TODO : HDW Implementation #79

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

guptamukund22
Copy link
Contributor

@guptamukund22 guptamukund22 commented Apr 16, 2024

In TODO , it is mentioned to create a simple version of HDW as wrapped in hdwallet.py. This code is just my implementation after reading BIP 39 Documentation . I wanted to clarify whether this is what is expected before I move further with BIP 32.

@karask
Copy link
Owner

karask commented Apr 17, 2024

Yes, this is the idea. I will need some time to think of proper way of proceeding with this before reviewing this PR. Bear with me.

@guptamukund22
Copy link
Contributor Author

Sure. Till then I will read more about BIP 32.

@karask
Copy link
Owner

karask commented Apr 26, 2024

I had a look at it and just realised that you are just wrapping around the python-mnemonic library. The existing code wraps another library. The goal was to implement them from scratch in an easy to understand way (clean code, comments), etc. for educational purposes.

@guptamukund22
Copy link
Contributor Author

Sure , I will try to implement it from scratch with comments.

@guptamukund22
Copy link
Contributor Author

I have tried to implement class HDW from scratch. I was thinking to proceed forward with from_mnemonic functionality of hdwallet, but I wanted to confirm whether this is the implementation you have in mind.

@guptamukund22
Copy link
Contributor Author

Hi @karask

I have implemented HDW class, which functions appropriately as an alternative for class HDWallet. The class includes functionalites pertaining to BIP 39 and BIP 32. Some of these methods are:

  1. from_mnemonic()
  2. from_xprivate_key()
  3. from_path, etc.

Class HDWallet in hdwallet.py is also modified and now instantiates HDW object and constant BIP32KEY_HARDEN has been added to constants.py accordingly.

I have also checked example file hdkeys.py to make sure the code runs appropriately. If there are any modifications you want me to make, please let me know.

@guptamukund22
Copy link
Contributor Author

Hi @karask
A gentle reminder.

@karask
Copy link
Owner

karask commented Mar 18, 2025

Hi @guptamukund22 !

My apologies for taking so long to look into this. I did not have time after your reminder and have seen it again now that I have some time.

Code looks OK. Some tests and an example would help a lot on this.

I intend to keep the old code (that wraps another library) as well until we ensure that everything works as expected with this one (creating keys is pretty critical !).

Again thanks for the contribution!

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.

2 participants