I need to know how to get the corresponding public key of a private key in hd-wallets, I don't need the derived ones but the public key who is related to the private I got.
A private key derived using the BIP32 hierarchical derivation is similar to any other one and the corresponding public key is obtained by "multiplying" your private by G, as ...
Individual address private keys begin with 5,L or K. What you're calling root private keys are actually called extended private keys and they begin with ?prv where ? is either x,z,y,Y,Z. You can see examples of those here. So that's how you tell the difference.
If you want to do Bitcoin stuff in nodejs, I recommend using bcoin:
docs, guides: https://bcoin.io
It has a fully-validating full node implementation, SPV implementation, and BIP44 wallet that is used by Purse.io and several other Bitcoin-accepting merchants for this exact use case: Each customer gets a dedicated ...