Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Point does not lie on the curve" is thrown when using multiple currency libs in the same environment #3128

Open
tayler-king opened this issue Apr 1, 2021 · 3 comments

Comments

@tayler-king
Copy link

This is following on from a previous issue on the old repository for bitcore-lib: bitpay/bitcore-lib#238

When using multiple currency libs in the same environment (bitcoin, doge, litecoin, etc). this error gets thrown when calling new bitcore.HDPrivateKey().toString().

Error: Point does not lie on the curve
    at Point.validate (/root/app/node_modules/bitcore-lib-doge/lib/crypto/point.js:123:11)
    at new PublicKey (/root/app/node_modules/bitcore-lib/lib/publickey.js:53:14)
    at Function.PublicKey.fromPrivateKey (/root/app/node_modules/bitcore-lib/lib/publickey.js:221:10)
    at PrivateKey.toPublicKey (/root/app/node_modules/bitcore-lib/lib/privatekey.js:361:30)
    at HDPrivateKey._buildFromBuffers (/root/app/node_modules/bitcore-lib/lib/hdprivatekey.js:486:30)
    at HDPrivateKey._buildFromObject (/root/app/node_modules/bitcore-lib/lib/hdprivatekey.js:376:15)
    at new HDPrivateKey (/root/app/node_modules/bitcore-lib/lib/hdprivatekey.js:61:10)
    at Function.HDPrivateKey.fromSeed (/root/app/node_modules/bitcore-lib/lib/hdprivatekey.js:422:10)
    at HDPrivateKey._generateRandomly (/root/app/node_modules/bitcore-lib/lib/hdprivatekey.js:396:23)
    at new HDPrivateKey (/root/app/node_modules/bitcore-lib/lib/hdprivatekey.js:45:17)

Is there any workaround to this?

@tayler-king
Copy link
Author

Unfortunately the above patch didn't fix the issue.

@rowandh
Copy link

rowandh commented Aug 25, 2021

This might help: #3205

@tayler-king
Copy link
Author

This might help: #3205

Thanks, I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants