ethers-io / ethers.objc

Fast, simple and complete library for Ethereum in Objective-C.
MIT License
157 stars 57 forks source link

I have fully understood the mnemonic, private key and Keystore. #30

Open WHeB opened 5 years ago

WHeB commented 5 years ago

I have fully understood the mnemonic, private key and Keystore. Thank you for your help! I closed this issue.

Originally posted by @CivelXu in https://github.com/ethers-io/ethers.objc/issues/12#issuecomment-351961313

WHeB commented 5 years ago

How to get mnemonic for private key import?Thank you!

ricmoo commented 5 years ago

You cannot derive a mnemonic from a private key.

A mnemonic phrase is a one-way relationship, given a mnemonic, you can derive any number of private keys at different paths, but given a private key there is no way to determine what mnemonic (if any) was used to derive it.

Generally, you should use a random price of entropy to generate your mnemonic, which you can then derive private keys from and use.