Commit Graph

50 Commits

Author SHA1 Message Date
Ryan X. Charles 338158ca46 fix sjcl issue on npm install
...by including sjcl locally
2014-06-06 11:49:58 -07:00
Ryan X. Charles af9fdff3a9 use SJCL AES to get ECIES working in the browser 2014-06-03 19:03:50 -07:00
Ryan X. Charles e963ff3c45 add ECIES support in node - not browser 2014-06-02 20:15:58 -07:00
Ryan X. Charles c038abc8e7 rename BIP32 -> HierarchicalKey, deprecate BIP32
Sounds better.
2014-05-11 13:09:57 -04:00
olalonde b26dd77911 Armory: added to bitcore.js, build.js and browser example 2014-05-08 07:54:11 +08:00
olalonde 78ae388553 Replace process.versions tests by browserify's package.json browser field. Fixes #329 2014-05-07 14:14:10 +08: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 fff988da94 add deprecated bitcore.bignum and bitcore.base58
(the non-deprecated versions are bitcore.Bignum and bitcore.Base58)
2014-04-28 18:28:32 -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
Ryan X. Charles 350f6ae998 Key should make sure new privkey is less than N
...this involves adding a Curve class, and significant refactoring to make this
possible in a clean way.
2014-04-23 21:15:55 -03: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
olalonde 2644dbb2db Electrum.js: wrote some tests 2014-04-21 04:21:33 +08:00
Ryan X. Charles 659dc10f96 add support for signing/verifying messages
This adds a new Message class with static methods for signing and verifying a
message the same way as bitcoind. (In a nutshell, messages a prepended with
"Bitcoin Signed Message:" before being hashed and signed).

There is one important piece missing ... verifying a signature with an address,
and not a public key. I have not yet implemented this because the cryptography
interface of bitcore does not allow me to derive the public key from a
signature. This will need to be added before verifying from an address is
possible.
2014-04-19 11:28:19 -03:00
Eric Martindale a2d616da5b Project reorganization. 2014-04-13 13:28:42 -07:00
Manuel Araoz 3cbcbd54cb fix Buffers.skip in the browser 2014-04-10 18:52:13 -03:00
Ryan X. Charles 93050e3e92 Merge branch 'feature/TransactionBuilder' 2014-03-30 21:02:22 -04:00
Matias Alejo Garcia cb1a2d9b48 TransactionBuiler working with test 2014-03-28 21:17:34 -03:00
Ryan X. Charles a0daef56d9 Merge pull request #165 from ryanxcharles/feature/bip32
BIP 32 (hierarchical deterministic wallets)
2014-03-28 18:54:58 -04:00
Ryan X. Charles f6aa01c445 add basic tests for all functions in Point 2014-03-28 18:07:23 -04:00
Manuel Araoz 18630bb2b1 fix browser tests 2014-03-26 12:00:03 -03:00
Ryan X. Charles 22b57feb7b Get test vector 1 working in node 2014-03-22 16:16:22 -07:00
Matias Alejo Garcia 5b95b0f0fd Block.js tests WIP 2014-03-21 16:38:01 -03:00
Ryan X. Charles 602442c2ab add bitcore.KeyModule back as deprecated
This will allow bitcore.KeyModule to work with existing code, but it prints out
a message that it is deprecated.
2014-03-13 13:59:04 -04:00
Ryan X. Charles 05f6e28642 update interface, bitcore.KeyModule.Key -> bitcore.Key
It's annoying and easy to forget to type in bitcore.KeyModule.Key. I have
updated this so that now you can just do bitcore.Key. Tests pass in node and
the browser. This is a backwards-incompatible change so all software that
depends on the old style key generation will need to be updated.
2014-03-13 13:31:02 -04:00
Matias Alejo Garcia 5be37f2c7b remove PeerManager exception, no necesary anymore 2014-03-12 00:11:12 -03:00
Ryan X. Charles acd42bf459 remove comment 2014-03-10 17:07:13 -04:00
Ryan X. Charles 5b67d91f35 fix the loading for Key.js
Now, like all other modules loaded in the bitcore object, Key is only required
when it is actually used. All tests pass in node and the browser.
2014-03-10 17:04:23 -04:00
Ryan X. Charles 8a41414114 add caching feature for bitcore.X requires
Normally when one loads the bitcore object, all classes are loaded into memory,
even if they are not used. This comment updates this so that the classes are
only required when they are actually used, preserving memory and making bitcore
as small and light for each project. This code is only relevant for node, since
the browser will have the ability to compile only the selected components.
Also, the Key class does not yet work with this, but everything else does.
2014-03-10 16:47:52 -04:00
Matias Alejo Garcia 089fbab719 support soop with browser all test passing 2014-03-08 18:42:08 -03:00
Manuel Araoz 6a24e7fbe0 load test data from files 2014-02-24 11:59:43 -03:00
Manuel Araoz 915c048c3b browser ECDSA compressed key generated 2014-02-24 09:39:42 -03:00
Manuel Araoz 0f393cb989 ECDSA key browser work 2014-02-24 09:39:42 -03:00
Manuel Araoz 47fb987600 Added more classes to browser 2014-02-19 16:07:50 -03:00
Manuel Araoz c693d01a44 Deserialize test 2014-02-19 14:30:48 -03:00
Manuel Araoz 339ef3073b add const test 2014-02-19 14:27:03 -03:00
Manuel Araoz bf641ef954 refactor tests 2014-02-19 14:25:14 -03:00
Manuel Araoz ed90a2ebe6 Browserify Bloom 2014-02-19 12:49:21 -03:00
Manuel Araoz 8ab1c3feae Transaction, Connection, Peer, Block, ScriptInterpreter working in the browser! 2014-02-19 12:36:19 -03:00
Manuel Araoz bf0010b8ac fix buffertool's fill calls 2014-02-18 16:03:44 -03:00
Manuel Araoz 1dcd941331 fixed various test problems 2014-02-18 16:03:44 -03:00
Manuel Araoz 0096238004 migrating buffertools compare method and test 2014-02-18 16:03:43 -03:00
Manuel Araoz 3d901a12f2 added tests to Block and Peer, and migrated buffertools usage 2014-02-18 16:03:43 -03:00
Manuel Araoz 4496ed369a fix Transaction for node 2014-02-18 11:39:47 -03:00
Manuel Araoz 05bb2ff3df change name for sin-test 2014-02-17 17:55:56 -03:00
Manuel Araoz 0d5573dc16 Script class working in browser! 2014-02-06 15:49:22 -03:00
Manuel Araoz e295e33800 starting with Transaction class 2014-02-06 12:57:47 -03:00
Manuel Araoz fc93218c56 Address working in the browser 2014-02-05 18:15:10 -03:00
Manuel Araoz 0a6ddaffa3 EncodedData working in the browser 2014-02-05 18:15:10 -03:00
Manuel Araoz 304fdc013d starting address migration 2014-02-05 18:15:10 -03:00
Manuel Araoz 5a90473d12 tests work in browser and node 2014-02-04 16:37:34 -03:00