How do you create a 12 or 24 mnemonics code for multiple cryptocurrencies (ETH, BTC and so on..)

839

You can use one mnemonic code for all cryptocurrencies. As you can see in the library documentation you linked, you use the mnemonic code to get a wallet seed. That wallet seed is then used to create a HD wallet.

That single HD wallet can have many different cryptos. You differentiate between them by following the scheme in BIP44. In the accompanying SLIP44 there's a list of what HD wallet constants each currency uses.

Share:
839
Omega
Author by

Omega

Updated on December 11, 2022

Comments

  • Omega
    Omega over 1 year

    I just started using Flutter and I am trying to create a crypto wallet app that can support multiple different cryptocurrencies. The current issue I am facing is, is that I don't know how a mnemonics code is being generated for different cryptocurrencies when trying to create a backup for multiple wallets. I am using this library btw: https://pub.dartlang.org/packages/bip39

    Any help would be much appreciated!

  • Omega
    Omega about 5 years
    Ah, I didn't know this. Thanks a lot for making things more clear, but is there an example I can follow on any site? I tried searching for examples, but no big results so far..
  • torkel
    torkel about 5 years
    What sort of example are you looking for? There's quite a bit going on here, with entropy generation, mnemonic derivation from that entropy, seed generation from the mnemonic, and finally private key generation from the seed
  • Omega
    Omega about 5 years
    I was searching for a code example online, but it seems not easy to find the right example I am looking for. Maybe it's because of the wrong search term I use on Google? Honestly, thanks for your help so far!
  • torkel
    torkel about 5 years
    Here's an example that should cover what you're asking for: github.com/bitcoin-s/bitcoin-s-core/tree/master/…. It's written in Scala, but should hopefully give you some pointers.
  • Omega
    Omega about 5 years
    I noted that I need Bip44 to generate Ethereum wallets as well... The current library I am using doesn't support Ethereum (yet, I think): pub.dartlang.org/packages/bitcoin_bip44#-installing-tab- Can I use another library that takes the hex seed I generated using Bip32 and use it there to generate HD wallet for Ethereum as well? I am just not sure about the limitations. Is there a faster way to communicate with you by Discord or anything related? Thanks for your help so far!
  • torkel
    torkel about 5 years
    I'm not familiar with addresses in Ethereum, I'm sorry.