-
Notifications
You must be signed in to change notification settings - Fork 1k
bitcore-lib-cash: Point does not lie on the curve #180
Comments
Are you using bitcore-lib and bitcore-lib-cash at the same time? I can generate PrivateKeys and Addresses without any problem if I use bitcore-lib-cash alone. However, if both libs are imported, I get
|
how to generate privatekey and adress can u tell me step by step and where
i can get sofware
regards
…On Wed, Jan 17, 2018 at 1:31 PM, arrix ***@***.***> wrote:
Are you using bitcore-lib and bitcore-lib-cash at the same time?
I can generate PrivateKeys and Addresses without any problem if I use
bitcore-lib-cash alone. However, if both libs are imported, I get Error:
Point does not lie on the curve when pk.toPublicKey() is called
var bc = require('bitcore-lib')
(new bch.PrivateKey).toPublicKey()
(new bc.PrivateKey).toPublicKey()
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#180 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AhnILSMSZ9q7bmrLchvYdvYWBI3vcd5Rks5tLZPMgaJpZM4Q3s2X>
.
|
Thanks @arrix. The problem was because I was using Bitcore Mnemonic with the bitcore-lib-cash and they were conflicting. Bitcore Mnemonic uses bitcore-lib as a dependency. |
The conflict may be worked around by requiring the two libs in specific order.
Note that bitcore-lib-cash/lib/publickey.js called into bitcore-lib/lib/crypto/point.js.
If bitcore-lib is required before bitcore-lib-cash, it seems to work.
|
Cool thanks!
I'll give it a try.
…On Wed, Jan 17, 2018 at 10:59 AM, arrix ***@***.***> wrote:
The conflict may be worked around by requiring the two libs in specific
order.
// Error: Point does not lie on the curve
var bch = require('bitcore-lib-cash')
var bc = require('bitcore-lib')
(new bch.PrivateKey).toPublicKey()
(new bc.PrivateKey).toPublicKey()
Note that bitcore-lib-cash/lib/publickey.js called into
bitcore-lib/lib/crypto/point.js.
Error: Point does not lie on the curve
at Point.validate (/xxx/node_modules/bitcore-lib/lib/crypto/point.js:119:
11)
at new PublicKey (/xxx/node_modules/bitcore-lib-cash/lib/publickey.js:53:
14)
at Function.PublicKey.fromPrivateKey (/xxx/node_modules/bitcore-
lib-cash/lib/publickey.js:221:10)
at PrivateKey.toPublicKey (/xxx/node_modules/bitcore-
lib-cash/lib/privatekey.js:362:30)
If bitcore-lib is required before bitcore-lib-cash, it seems to work.
// seems to work
var bc = require('bitcore-lib')
var bch = require('bitcore-lib-cash')
(new bch.PrivateKey).toAddress()
(new bc.PrivateKey).toAddress()
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#180 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAOfhpreKItvYxAdayRrIV3wqwG015-dks5tLbaPgaJpZM4Q3s2X>
.
|
Thank you, @arrix Thank you for the help! |
When using the bitcore-lib-cash library the Error Point does not lie on the curve is thrown.
Using Typescript:
Any pointers are much appreciated.
The text was updated successfully, but these errors were encountered: