eordano
0938eadab5
Add precondition checks to HDPrivateKey.from*
2015-02-18 13:14:12 -03:00
Braydon Fuller
904df59493
Added docs link to InvalidArgument message for preconditions.
...
- Error messages will appear as: "Invalid Argument: First argument is required, please include address data. Documentation: http://bitcore.io/guide/address.html "
2015-02-09 21:46:10 -05:00
Esteban Ordano
69b466470a
HDKeys: Return a copy buffer instead of the original instance
2015-02-05 15:06:01 -03:00
Esteban Ordano
5ae97a7146
Merge pull request #893 from braydonf/bug/json-detection
...
Fixed an issue where a hexa string was mistakenly recognized as JSON
2015-01-03 10:31:45 -05:00
Braydon Fuller
a1ee393dce
JSUtil: Return result quicker for isValidJSON and add additional tests.
2015-01-02 19:38:22 -05:00
Braydon Fuller
c20a0eabed
Check type of parsed JSON to determine it's an object and not a number.
2015-01-02 19:32:49 -05:00
Esteban Ordano
476f009b4d
Add Insight and UTXO class
2015-01-02 15:59:13 -03:00
Esteban Ordano
12cac0e33d
Fix tests on browsers: need to add Buffer exception
2014-12-17 12:38:56 -03:00
Esteban Ordano
afb5b6971f
Add tests for bufferutils
2014-12-17 12:10:02 -03:00
Esteban Ordano
d4b8c4adc6
Remove globals
2014-12-16 17:30:43 -03:00
Esteban Ordano
de4d2884c7
Modify Transaction to use Multisig
...
* Allow `Script#add` to add a Script causing concatenation of opcodes
* Add `Script#equals` to compare scripts
* Add `Script#fromAddress`
* Drop `_payTo` methods
* Add `Script.buildP2SHMultisigIn`
Greatly simplifying the internal transaction object
2014-12-15 18:19:54 -03:00
Braydon Fuller
94cc10b1a3
Changed *Json to *JSON and returned an object so that methods can be called from other toJSON methods without the double-stringification issue.
2014-12-12 12:06:39 -05:00
Braydon Fuller
c73c56f938
HDKeys: Modified to have immutable properties
2014-12-11 15:37:31 -05:00
Yemel Jardi
ee169a80af
Replace buffertools
2014-12-11 12:45:24 -03:00
Yemel Jardi
68f50b2f61
Add messages serialization
2014-12-10 18:09:26 -03:00
Yemel Jardi
f1d2009418
Add transport/connection class
2014-12-10 18:09:26 -03:00
Esteban Ordano
5c974a8ef2
Refactor transaction to match new API
...
* Refactor transaction into a different subfolder
* Added a lot of tests for sighash and transaction serialization (from
reddit's and Ryan X. Charles' `fullnode`)
* Drop "only" from sighash tests and consolidate logs
2014-12-10 12:44:30 -03:00
Manuel Aráoz
01b74b8df5
Merge pull request #695 from eordano/feature/errors
...
Add a preconditions module, and refactor errors
2014-12-10 12:35:31 -03:00
Esteban Ordano
ea17a6ace1
Add a preconditions module, and refactor errors
...
100% code coverage for the preconditions module.
Usage:
```
$.checkState(something === anotherthing, 'Expected something to be
anotherthing');
$.checkArgument(something < 100, 'something', 'must be less than 100');
$.checkArgumentType(something, PrivateKey, 'something'); // The third
argument is a helper to mention the name of the argument
$.checkArgumentType(something, PrivateKey); // but it's optional (will
show up as "(unknown argument)")
```
2014-12-10 11:56:38 -03:00
Esteban Ordano
3551742fee
Miscelaneus updates to docs and bufferreader/writer
2014-12-09 17:31:20 -03:00
Esteban Ordano
a2a51ecc0c
Fix style: move each static function to an appropiate namespace
2014-11-30 09:47:44 -03:00