Unable to generate private key in node v11.15.0
alko89 opened this issue · 7 comments
alko89 commented
Trying to generate private key using node -p "require('btcpay').crypto.generate_keypair()"
returns a large object instead of the private key.
Using the same command with node v10.16.0 works as expected:
<Key priv: c5e246de8c156c607658391641d42a1040914c78509c76acc8752947dd4ff091 pub: null >
(node:26425) [DEP0079] DeprecationWarning: Custom inspection function on Objects via .inspect() is deprecated
NicolasDorier commented
@takinbo any idea?
alko89 commented
On v11.15.0. Downgrading solved the issue.
johnbailon commented
You can do this instead:
node -p "require('btcpay').crypto.generate_keypair().getPrivate('hex')"
NicolasDorier commented
@takinbo I guess the doc somewhere is outdated.
NicolasDorier commented
fixed by #32
AryanJ-NYC commented
I ran into this same docs bug. I noticed #32 was merged into branch btcpayserver:dev
and not master
. This may confuse users that try to use this library for the first time.