monero-ecosystem / monero-python

A comprehensive Python module for handling Monero cryptocurrency
BSD 3-Clause "New" or "Revised" License
245 stars 79 forks source link

Generate Keys and Addresses #9

Closed cryptochangements34 closed 6 years ago

cryptochangements34 commented 6 years ago

8 asks for wallet generation and I just did this over the week in PHP, so here it is. It only does regular addresses, not subaddresses and does not currently use mnemonic seeds but the keys + address can be used in the official wallet to restore a fully functional wallet. It also isn't named all that cleverly, but this way you have it.

emesik commented 6 years ago

I see a big tab-space indentation conflict here, which prevents importing.

I'm not a fan of space indentation but in Python we must keep it uniform anyway. So, let's do it PEP8-style. Also it implies CamelCase class names and snake_case method/function names.

Other stuff I'll discuss in #11 as these two can and should be merged.

cryptochangements34 commented 6 years ago

The formatting has been fixed as you requested and it is now compatible with both python2 and python3.

emesik commented 6 years ago

Since we have #11 merged already, it seems this code could become a part of the Seed class. It already handles hex-passphrase conversion, so key derivation seems like a natural extension.

What do you think?

cryptochangements34 commented 6 years ago

Sure I could start putting this in the seed class if you think that would be more practical

cryptochangements34 commented 6 years ago

Done. At this point commits should probably be squashed too

Edit: after screwing up with git bad enough I have decided I will close this and just open a new PR lol

lalanza808 commented 6 years ago

😆 https://xkcd.com/1597/