Closed Ayms closed 5 years ago
Right now you can use such hack for access to bn.js
from elliptic
:
const elliptic = require('elliptic')
const BN = elliptic.utils.intFromLE('0').constructor
OK, but my suggestion is to make it directly available from elliptic, not a big deal I think
Did you see the posts from (closed) https://github.com/browserify/browserify/issues/1923 ?
Why does bn.js appear twice after npm install of elliptic?
Yeah, I had seen. I do not see that bn.js installed twice:
npm install elliptic
+ elliptic@6.5.0
npm ls bn.js
/home/kirill/tmp/node-test
└─┬ elliptic@6.5.0
└── bn.js@4.11.8
Only one bn.js version. Same for yarn.
Closing... not sure what I did when I installed elliptic first, maybe I used a too old version of npm,reinstalling correctly does not cause the duplication effect
Continuation of https://github.com/indutny/bn.js/issues/227
And please see https://github.com/browserify/browserify/issues/1923
Let's see if we get some feedback, apparently it does not look like an elliptic issue but I think it would not be bad to add something like
utils.BN=BN
or in elliptic.js so BN becomes available from elliptic directly