Commit Graph

44 Commits

Author SHA1 Message Date
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
Ryan X. Charles
ba692aaa20 add new SecureRandom class that does the right thing
Generating random numbers properly depends on the platform. The new
getRandomBuffer method does the right thing on the right platform. It will
sometimes fail due to insufficient entropy. The getPseudoRandomBuffer class is
also provided that will never fail, but it is not cryptographically secure and
should not be used for keys.
2014-04-22 22:18:59 -03:00
Ruben de Vries
9c6c300289 fixed calcDifficulty by making sure the MAX_TARGET is also locally available.
added tests for 2 difficulty calculations.
2014-04-08 10:26:36 +02:00
Manuel Araoz
2c331cb2ef some hashForSignature tests passing! :D 2014-04-03 15:55:54 -03:00
Ryan X. Charles
ba59d97a73 make things work in the browser by fixing sha512
...had to use jsSHA package to do SHA512 in the browser. Unfortunately it is
quite slow compared to node.
2014-03-22 16:16:58 -07:00
Ryan X. Charles
fa47ee9984 Merge remote-tracking branch 'matiu/feature/Block-test'
Conflicts:
	util/util.js
2014-03-21 14:57:45 -07:00
Matias Alejo Garcia
684be77268 small fixes in block, adapt to browser bignum. remove legacy code 2014-03-21 16:39:38 -03:00
Manuel Araoz
1c1bb068b8 fix util problem 2014-03-21 12:13:24 -07:00
Manuel Araoz
ba92a6b1df refactor and fixes for Transaction, ScriptInterpreter, and Key 2014-03-21 12:13:23 -07:00
Manuel Araoz
cfe899ee76 fix Transaction#create tests 2014-03-19 13:16:01 -03:00
Manuel Araoz
856225d377 fix for firefox 2014-03-19 12:26:36 -03:00
Manuel Araoz
9ef8b78182 refactor int conversion, encoding, and utils 2014-03-19 12:26:36 -03:00
Manuel Araoz
5505491e8d fix negative number arithmetic! 2014-03-19 12:26:36 -03:00
Manuel Araoz
19e15f91ca size tests working!!! :D 2014-03-19 12:26:36 -03:00
Matias Alejo Garcia
671d372c19 tx creation working. more tests needed 2014-03-15 03:27:06 -03:00
Matias Alejo Garcia
0f8ee57521 refactor ripe160 binding 2014-03-12 15:34:19 -03:00
Matias Alejo Garcia
dc8d23dba5 fix conflicts 2014-03-12 11:56:10 -03:00
Matias Alejo Garcia
ab183c0e66 fixes ripe160 add some tests 2014-03-12 11:40:10 -03:00
Manuel Araoz
18b2d190de change vendor.js to vendor-bundle.js 2014-03-11 15:29:06 -03:00
Manuel Araoz
76cf42506c refactoring browser code 2014-03-11 12:32:38 -03:00
Manuel Araoz
dc56cb8d45 fixed Script parse tests for all scripts (valid and invalid) 2014-03-07 15:41:27 -03:00
Mike Belshe
cda6d035b4 * Fix size bug in bitcore's getVarIntSize.
* Implement quadword for varIntBuf
* Add unit tests for util.varIntBuf and util.getVarIntSize
* Fix the browser/util numToVarInt equivalent as well
2014-03-06 22:01:22 -08:00
Manuel Araoz
05c5538162 script parser code added and tested 2014-03-06 17:23:00 -03:00
Matias Alejo Garcia
be4a228aee prevent requiring bitcoinjs-lib each time 2014-02-27 23:10:35 -03:00
Manuel Araoz
066936d69b fix ripemd160 for browser and add tests 2014-02-27 20:02:11 -03:00
Manuel Araoz
e0233f02dd fix Buffer.concat use 2014-02-18 16:03:44 -03:00
Manuel Araoz
4da3285930 fix toHex use 2014-02-18 16:03:44 -03:00
Manuel Araoz
966b8988e1 fix reverse buffertools use 2014-02-18 16:03:44 -03:00
Manuel Araoz
bf0010b8ac fix buffertool's fill calls 2014-02-18 16:03:44 -03:00
Manuel Araoz
cdf53d1fc5 migrating to buffertools best practices 2014-02-18 16:03:43 -03:00
Manuel Araoz
10a23cdd88 remove strict 2014-02-18 12:19:46 -03:00
Manuel Araoz
4496ed369a fix Transaction for node 2014-02-18 11:39:47 -03:00
Manuel Araoz
0d5573dc16 Script class working in browser! 2014-02-06 15:49:22 -03:00
Matias Alejo Garcia
f35c03544b replace tabs with 2 spaces using "expand" 2014-01-16 06:21:35 -03:00
Ryan X. Charles
71cd92d225 fix truncation error in parseValue 2013-12-18 20:08:52 -05:00
Stephen Pair
709b2903c1 remove dead code 2013-10-31 12:55:30 -04:00
Stephen Pair
467f0779f7 Merge branch 'master' of https://github.com/gasteve/node-libcoin
Conflicts:
	util/util.js
2013-10-31 12:44:22 -04:00
Stephen Pair
f9e86a5e83 rework logging, remove some unused code 2013-10-31 12:40:06 -04:00
Jeff Garzik
da5719249f util/util: helper parseValue() converts bitcoin decimals into bigint 2013-09-14 22:59:29 -04:00
Jeff Garzik
b38863e4db util/util: remove buf64(), both incorrect and unnecessary 2013-09-13 15:32:35 -04:00
Jeff Garzik
32859a8da8 Transaction: prefer to directly use a Buffer, where possible 2013-08-16 01:45:55 -04:00
Jeff Garzik
e10afb7358 util: add varInt encoding helper 2013-08-16 00:56:29 -04:00
Stephen Pair
ebddafcaa7 some more stuff...not complete yet 2013-07-09 17:45:21 -04:00
Stephen Pair
56a20ef25d bunch of interim (broken) stuff 2013-07-09 14:45:52 -04:00