How to generate address from xpub in JS? Should i use BIP39 or 44? If yes, how exactly?
1 Answer
You can use ethereumjs-wallet, from their unit tests
var xpub = 'xpub661MyMwAqRbcGout4B6s29b6gGQsowyoiF6UgXBEr7eFCWYfXuZDvRxP9zEh1Kwq3TLqDQMbkbaRpSnoC28oWvjLeshoQz1StZ9YHM1EpcJ'
var addr = Wallet.fromExtendedPublicKey(xpub).getAddressString()
assert(addr, '0xb800bf5435f67c7ee7d83c3a863269969a57c57c')