omgnetwork / ewallet

eWallet Backend for the OmiseGO SDKs.
https://omisego.network/
Apache License 2.0
324 stars 74 forks source link

Ethereum account generation in eWallet #689

Closed T-Dnzt closed 5 years ago

T-Dnzt commented 5 years ago

This issue consists in implementing a module that will generate a new Ethereum account and all the needed helper functions. From it, we should be able to get a private key, a public key and an address. This will later be used for hot wallet generation.

unnawut commented 5 years ago

Question: Does it generate a private key directly or should it be a mnemonic phrase?

Actually a mnemonic phrase would allow multiple addresses under the same phrase as well, which would be useful in generating more addresses for accounts & custodial users?

T-Dnzt commented 5 years ago

But can't we just re-generate new private / public when needed? I don't see the usefulness of using a mnemonic phrase.

unnawut commented 5 years ago

Ok so referring to #690 that private keys will be encrypted & stored in the database, with the single encryption key stored in environment variable. This should solve the trouble having to manage a lot of private keys.

T-Dnzt commented 5 years ago

A library we might want to explore: https://github.com/izelnakri/eth

unnawut commented 5 years ago

Looks like izelnakri/eth is mainly a wrapper over mana-ethereum/ethereumex that casts and maps values. Very handy!

But given that it's been inactive since May 2018, we might want to roll our own that uses mana-ethereum/ethereumex directly.

unnawut commented 5 years ago

Closed by #807 and #863