Commit Graph

9 Commits

Author SHA1 Message Date
Ryan X. Charles 0251d467c4 update bn.js to latest version
...and correspondingly get rid of Number->String conversion

See: https://github.com/indutny/bn.js/issues/17
2014-07-15 11:25:18 -07:00
Ryan X. Charles 3cbf2e07c4 use decorate on gt and lt 2014-07-10 18:45:27 -07:00
Ryan X. Charles 80bba1cf81 use a decorate function to optimize bundle filesize 2014-07-10 18:27:15 -07:00
Ryan X. Charles af1d754bd8 make bignum interface backwards compatible
- fix cmp, mul, div, add, mod, sub functions to take numbers and strings
- fix Point class to use common folder correctly
2014-07-10 18:14:13 -07:00
Ryan X. Charles e4cb7d2014 remoe unimplemented bignum.pow() 2014-07-10 16:47:05 -07:00
Ryan X. Charles c8fe404402 replace bignumber.js with bn.js 2014-07-10 16:20:13 -07:00
Ryan X. Charles ca67786a77 ran js-beautify on all bitcore source
js-beautify -s 2 -r *.js

...did not run on bundles, only on source.
2014-06-23 10:57:02 -07:00
Ryan X. Charles 405ea0bf6f fix bignum issue
In the browser, sometimes the config for bignum wasn't being set up if (somehow
... still not sure how this is possible) you use bitcore without using
require('bitcore'). This would by pass the code that set the config for bignum.
Solution is to put the config for bignum in bignum itself (in the browser).

This fixes, in particular, an issue with base58 where it was depending on
bignum having the proper config.

Also I add the base58 tests to run in the browser which they weren't
previously.

And finally I add a small test for Bignum in the browser that makes sure the
config is set properly.
2014-04-29 17:59:24 -04:00
Ryan X. Charles 7f348ca0bd Move BigNumber to internal
...no longer relies on Manuel's repo hostig a version of "bignum" that actually
contained bignumber.js. This moves bignumber.js internally and removes bignum
from the browser build process. Also adds a bitcore.Bignum that links to the
right thing. In node, browser.Bignum is require('bignum'). And in the browser,
bitcore.Bignum is is now Bignumber.js (same as before ... except bignumber.js
is now inside bitcore).
2014-04-28 18:00:59 -04:00