Goal: generate a few millions addresses and remember or store the private keys of each of them in an easy manner.

Using the most straighforward approach, that is, storing all of the addresses as "address / private key", alhtough will work, won't be optimal for me.

Q: Will a seed, or mnemonic, phrase help with this?

Namely, if I lose some of the private keys, will I be able to deduce them from a seed phrase? And how, in terms of code?

1 Answer 1

ganache-cli -m "my seed phrase seedy seedo phrase phrase" -a 1000000. 

should work. The -a gives you that many accounts and the quotes after -m are you're seed phrase. Don't know if 1M is above the limit (almost certain it is), but you could always just do 10k and then have the same seed phrase but change the last word for each iteration(e.g. "one", then "two")

Note, no idea why you're doing this, but be careful obviously if you're storing funds in these. Definitely don't recommend custodying crypto for folks

  • That's only a part of an answer. ==> if I **lose** some of the private keys, will I be able to deduce them from a seed phrase? And **how**, in terms of code?
    – Amanarajo
    May 16, 2022 at 14:11
  • the seed phrase maps to private keys. Just give that command a try. You'll get a whole list of private keys. If you just remember the seed phrase, you remember the keys
    – thefett
    May 16, 2022 at 15:32
  • That hasn't answered my question. Once again: given a seed phrase and an address derived from it, and nothing else -- how would I get the private key of an address?
    – Amanarajo
    May 16, 2022 at 19:21
  • did you run the command? It literally spits out private keys
    – thefett
    May 17, 2022 at 12:38
  • 1) Are you able to read or not? The fact that "it splitls out private keys" doesn't help me 2) Where did I say that I myself run a node?
    – Amanarajo
    May 17, 2022 at 13:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.