I am developing a mobile wallet that supports multiple currencies (including Ethereum). As of now, it only supports one currency. The RPC wallet creation function for this currency returns a private key and public key for that currency wallet.
When I add more currencies (like Ethereum), I will have multiple private keys/public keys and would like all of them linked to a mnemonic/seed.
How would this be done? Can I create a custom seed and add private/public key pairs to it?
Or can I use my already existing private/public key pair to generate a seed?
Best Answer
You're going about this in the wrong direction.
You cannot construct arbitrary seeds from existing keys, nor can you add existing keys to an existing seed.
A
seed->address key
process is one way, and you must start with a seed. Any existing keys will have to be handled separately, and will not be related to the seed in any way.There is a standardized method for generating multiple coin addresses from a single seed, which you can find under BIP-44. The list of registered coins can be found at SLIP-44.
There are a number of libraries to work with these specifications, for various coins. As long as you provide them with the same seed, all of your addresses will originate from that seed.