Fortuitously, in 2012 the developer Pieter Wuille designed the BIP32 specification at The bottom with the hierarchical deterministic wallets. Collectively with it, Pieter developed a mathematical function to produce a learn key from which to derive all other keys within a deterministic way. The usage of BIP44 with BIP32 helps https://jsbin.com/jeyomidozi