litecore-archive / litecore-lib

A pure and powerful JavaScript Litecoin library
https://litecore.io/
Other
72 stars 85 forks source link

xpub to get all address #21

Open jamalmohideen opened 4 years ago

jamalmohideen commented 4 years ago

Hi, I need to get all the generated addresses for an xpub (or Ltub) extended public key. When I use the HDPublicKey.deriveChild(path, false), it is giving me this error:

message: 'Invalid argument: creating a hardened path requires an HDPrivateKey', stack: 'Invalid argument: creating a hardened path requires an HDPrivateKey\n' + 'Error\n' +

Please help me to get the list of addresses from xpub or ltub extended public key.