Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

General: Import account via Mnemonic

See original GitHub issue


Right now you an import a private key, but you should have the option to import both by mnemonic and private key (and also display both when generating)

This applies to the ape-account plugin.


Brownie does this currently. Also see here


No dependencies

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

fubuloubucommented, Sep 16, 2022

So, this was put on a blanket disclosure. I actually don’t think it’s that big of a deal.

Here’s why:

  • the mnemonic to master seed algorithm implements a checksum, and the UX is very safe. if there was a bug with the algorithm, it would generate the wrong master seed and the user wouldn’t get the right private key in hd path
  • the master seed hierarchical derivation algorithm could have a bug in it, but if it did it would generate the wrong private key which would not have the address the user would seek
  • once it’s in a private key format, the rest of the eth-account implementation is audited that deals with signing. mnemonic is not a signing method
  • the implementation has been fuzzed against ethers.js

Honestly, could probably petition to remove the disclosure in eth-account, at the time I implemented it this was done as a cautionary measure, it’s been over 2 years without any issues, and people have used that implementation in Brownie since I did, so I think that combination of factors at least makes it safe to use in ape

Edit: these two methods are the only ones I could think of that could potentially be problematic:

fubuloubucommented, Sep 29, 2022

So will it be that the single prompt accepts either private key or mnemonic?

Yeah, probably a mutually exclusive option to import via private key (flag only, does not accept input this way only through secret input) or input via combo of mnemonic (also secret input only) and hdpath (which can be parameter, with sensible default), all to produce a singular account

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use recovery mnemonic in metamask to import ...
Importing a mnemonic can only be done when you are not logged in. It's best to backup any existing accounts in the current...
Read more >
goal account import - Algorand Developer Portal
Import an account key from a mnemonic generated by the export command or by algokey (NOT a mnemonic from the goal wallet command)....
Read more >
Create/Import/Export Wallet
Create/Import/Export Wallet ... You can choose to create a wallet through the extension or import your existing wallet using a mnemonic phrase or...
Read more >
Demo: Import a mnemonic seed phrase of another wallet
To get started select Import a wallet on the Choose your wallet screen and then select Mnemonic wallet. In the first step the...
Read more >
Import a Ledger account
Enter your mnemonic/seed phrase in the appropriate slot, separating the words by space & taking care to check that they are spelled correctly....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found