Skip to content
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

ETH私钥导入钱包,无法获取助记词 #60

Open
cw19920617 opened this issue Apr 24, 2019 · 4 comments
Open

ETH私钥导入钱包,无法获取助记词 #60

cw19920617 opened this issue Apr 24, 2019 · 4 comments

Comments

@cw19920617
Copy link

使用importWalletFromPrivateKey导入钱包,
Metadata metadata = new Metadata("ETHEREUM", Network.MAINNET, "name", "ETH", "");
metadata.setSource(Metadata.FROM_PRIVATE);
Wallet wallet = WalletManager.importWalletFromPrivateKey(metadata, privateKey, password, true);

成功导入后,导出助记词
MnemonicAndPath mnemonicAndPath = WalletManager.exportMnemonic(walletID, password);
返回对象mnemonicAndPath为空

@vae520283995
Copy link

真是人才,儿子能生出爸爸吗

@cw19920617
Copy link
Author

真是人才,儿子能生出爸爸吗

导入之前必须创建或者覆盖identify对吧

@vae520283995
Copy link

真是人才,儿子能生出爸爸吗

导入之前必须创建或者覆盖identify对吧

助记词是根,私钥是某一个叶子,不能反推的

@XuNeal
Copy link
Contributor

XuNeal commented Jun 8, 2020

助记词可以推到私钥,私钥不能推到助记词。
助记词到私钥是单向推到关系,不是一种关联关系。

导入之前确实需要创建identity。然后在该identity下你可以导入私钥钱包。该私钥钱包也可以导出私钥或者keystore.但是不能导出助记词

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants